ボタンの付いたVideoViewを表示するアンドロイドアプリがあります。ターゲットデバイスでは、VideoViewが再描画されるまで(たとえば、別のアクティビティから戻るときなど)、ボタンが正しく表示されます。その後、ボタンはVideoViewによって隠されます。ビデオビューでアルファブレンディングを強制する方法
これは他の2つのデバイスでは発生しません。アンドロイドではこれが予想される動作ではないことがわかります。私はそれがデバイスに投げられたと私はエラーと関係していると信じています。タグは'TIOverlay'
で、テキストは
'static void overlay_control_context_t::overlay_destroyOverlay(overlay_control_device_t*, overlay_t*) : Lets Switch off Alpha Blending'
である、それはアルファだ再計算するVideoViewを強制する方法はありますか?最初のビューが正しいので、再描画するときに完全なレイアウトを考慮していないと仮定します。
これは私のVideoView初期化コードです:私はビデオビューの前にボタンを表示するために使用していレイアウトがある
//set up video
this.videoView = (VideoView) findViewById(R.id.introVideoView);
videoView.setZOrderOnTop(false);
//create intro movie and begin playing
String uri = "android.resource://"+getPackageName()+"/"+R.raw.movie;
videoView.setVideoURI(Uri.parse(uri));
//set to looping
videoView.setOnPreparedListener(new OnPreparedListener(){
@Override
public void onPrepared(MediaPlayer mp)
{
mp.setLooping(true);
}});
videoView.start();
編集
:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mainLayout" >
<VideoView
android:id="@+id/introVideoView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<ImageButton
android:id="@+id/exitDemoButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:contentDescription="Exit Demo >>"
android:onClick="exitDemo"
android:background="#00000000"
android:src="@drawable/exit_selector" />
<LinearLayout
android:id="@+id/buttonLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/resumeVideoButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onResumeClicked"
android:contentDescription="Resume Video"
android:background="#00000000"
android:src="@drawable/resume_selector" />
<ImageButton
android:id="@+id/guidedTourButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onTourClicked"
android:contentDescription="Guided Tour"
android:background="#00000000"
android:src="@drawable/tour_selector" />
</LinearLayout>
"私は、その前にボタン付きのVideoViewを表示するアンドロイドアプリを持っています" - これはどうやってですか? – CommonsWare
良い質問と回答、ジェイソン!投票したあなた自身の質問に答えたので、別の "回答"ポストとして投稿して、クレジットを得ることをお勧めします。完全に正当なStackoverflowの動作。あなた自身の質問に答えるためのバッジもあります! –