title: video to fit screen in android
body: <p>I am trying to play a video in android using Video View, But the video is not completely stretching to fit the screen instead the video view is stretching and its showing black empty screen on either side of the Screen</p>
  
  <p>I want the video to be strecthed without considering any aspect ratio.</p>
  
  <p>any help on this</p>
  
  <p>Thanks &amp; Nagendra</p>
  
  <p>XMl:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" &gt;
  
      &lt;VideoView android:id="@+id/myvideoview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>setContentView(R.layout.main);
  getWindow().setFormat(PixelFormat.TRANSLUCENT);
  videoPlayer = (VideoView) findViewById(R.id.myvideoview);
  String uri = "android.resource://" + getPackageName() + "/" + R.raw.video;
  
  videoPlayer.setVideoURI(Uri.parse(uri)); 
  videoPlayer.setMediaController(new MediaController(this));
  videoPlayer.requestFocus();
  videoPlayer.setVisibility(0);
  videoPlayer.start();
  </code></pre>
  
  <p>This is the code i am using to play a video</p>
  
  <p>Thanks for your reply</p>