title: How to resize the frames of video and show it in a fixed size video view in android
body: <p>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</p>
  
  <pre><code>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);
      }
  }
  </code></pre>
  
  <p>and my xml is </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center_vertical" &gt;
  
      &lt;VideoView
          android:id="@+id/videoViewR"
          android:layout_width="wrap_content"
          android:layout_height="480dp"
          android:layout_centerVertical="true" &gt;
  
      &lt;/VideoView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>