0
我開發了在android應用程序中播放視頻的模塊。如果看到附加的圖像,視頻播放良好。但是當進度條出現時,我將無法點擊跳過視頻按鈕。如果進度條消失的圖像視頻進度條不允許其他按鈕的點擊事件
鏈接:https://docs.google.com/file/d/0B_xgCwfb-GVmX0psNzZXM09tVEU/edit?usp=sharing
下面是代碼:
private VideoView video;
public static MediaController mediaController;
private Button viewReadingsButton;
if (isViewReadingEnabled) {
ViewGroup.LayoutParams vparams = video
.getLayoutParams();
vparams.height = 480;
vparams.width = 800;
video.setLayoutParams(vparams);
}
video.setVisibility(View.VISIBLE);
if (isViewReadingEnabled) {
Log.i(TAGOXY,
"In BaseActivity:video():viewReadingsButton visible");
viewReadingsButton
.setBackgroundResource(R.drawable.video_skip_bg);
viewReadingsButton.setVisibility(View.VISIBLE);
}
video.refreshDrawableState();
// MediaController mediaController = new
// MediaController(BaseActivity.this);
mediaController = new MediaController(BaseActivity.this);
mediaController.setAnchorView(video);
mediaController.setPadding(200, 0, 0, 200);
// set the controllers to the video view
video.setMediaController(mediaController);
Log.i(TAGOXY,
"In BaseActivity:video():after MediaController");
video.setVideoURI(Uri.parse(loadVideoFileName));
Log.i(TAGOXY, "In BaseActivity:video():after setVideoURI");
// start the video
video.start();