大家好,我在对话框视图中嵌入视频视图时遇到问题
一切正常,除了显示在对话框中的视频比显示在活动的其余部分中要暗得多
有任何想法吗 ?
这是一些代码
button1main.setOnClickListener(new OnClickListener() {
public VideoView videoView = null;
@Override
public void onClick(View v) {
//set up dialog
Dialog dialog = new Dialog(CustomDialog.this);
dialog.setContentView(R.layout.maindialog);
//dialog.setTitle("This is my custom dialog box");
dialog.setCancelable(true);
this.videoView = (VideoView) dialog.findViewById(R.id.video);
VideoPlayer vp = new VideoPlayer(this.videoView, null);
vp.playVideo();
//set up button
Button button = (Button) dialog.findViewById(R.id.Button01);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
//now that the dialog is set up, it's time to show it
dialog.show();
}
});