am faa0c350: am be06bce1: Merge "Get rid of janky black box before the movie starts"

* commit 'faa0c3506f012f3a73893f7f0c337bbef9ee4c42':
  Get rid of janky black box before the movie starts
main
Tadashi G. Takaoka 2013-05-15 11:05:15 -07:00 committed by Android Git Automerger
commit 95abe990e3
2 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,7 @@
android:layout_height="0dp" /> android:layout_height="0dp" />
<VideoView <VideoView
android:id="@+id/setup_welcome_video" android:id="@+id/setup_welcome_video"
android:background="@color/setup_background"
android:layout_weight="@integer/setup_welcome_video_weight_in_screen" android:layout_weight="@integer/setup_welcome_video_weight_in_screen"
android:layout_marginTop="@dimen/setup_welcome_video_vertical_margin" android:layout_marginTop="@dimen/setup_welcome_video_vertical_margin"
android:layout_marginBottom="@dimen/setup_welcome_video_vertical_margin" android:layout_marginBottom="@dimen/setup_welcome_video_vertical_margin"

View File

@ -190,6 +190,14 @@ public final class SetupActivity extends Activity implements View.OnClickListene
mp.start(); mp.start();
} }
}); });
mWelcomeVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(final MediaPlayer mp) {
// Now VideoView has been laid-out and ready to play, remove background of it to
// reveal the video.
mWelcomeVideoView.setBackgroundResource(0);
}
});
mActionStart = findViewById(R.id.setup_start_label); mActionStart = findViewById(R.id.setup_start_label);
mActionStart.setOnClickListener(this); mActionStart.setOnClickListener(this);