VideoView’s onMeasure to scale up the video to fit inside a fullscreen view.

  setContentView(R.layout.wellcome);
        VideoView videoView = (VideoView) this.findViewById(R.id.videoView1);
        uri = "android.resource://" + getPackageName() + "/" + R.raw.tour;
        videoView.setVideoURI(Uri.parse(uri));
        videoView.requestFocus();
        videoView.setOnPreparedListener(new OnPreparedListener(){
        	public void onPrepared(MediaPlayer mp){
        		mp.setLooping(true);
        	}
        });
        videoView.start();
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg">
<!-- Video player -->
<VideoView android:id="@+id/surface_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_gravity="center">
</VideoView>
</FrameLayout>

Screen Shot 2015-02-27 at 8.46.15 AM

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply