Possible Duplicate:
Android: Mediaplayer: How to use SurfaceView or mediaplayer to play video in correct size
I am trying to play the mp4 Video by Below Code:
myVideoView = (VideoView)findViewById(R.id.myVideoView);
case R.id.playVideoBtn:
File file2 = new File("/sdcard/Pfront.mp4");
Uri video = Uri.fromFile(file2);
myVideoView.setVideoURI(video);
myVideoView.start();
break;
}
And In xml i have set it as like below code:
<VideoView
android:id="@+id/myVideoView"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_centerInParent="true"
/>
Now, All works fine. but if the Video screen width is smaller then the device Screen then it appears at the center of the screen and if the Video screen width is larger then the device screen width then i am not able to play that video.
So how can I set full screen size to my video ?
Please help me regarding this.