I want to resize my video and show it in the video view and maintain the quality of the video also, my main focus is that the video quality should not be harmed and it should be shown in the video view
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
VideoView videoView= (VideoView)findViewById(R.id.videoViewR);
Video v=new Video();
MediaController mc= new MediaController(this);
mc.setAnchorView(videoView);
Uri uri=Uri.parse(Environment.getExternalStorageDirectory().getPath()+"/eveq.3gp");
videoView.setMediaController(mc);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
and my xml is
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical" >
<VideoView
android:id="@+id/videoViewR"
android:layout_width="wrap_content"
android:layout_height="480dp"
android:layout_centerVertical="true" >
</VideoView>
</RelativeLayout>