title: Full Screen Video Without Break Aspect Ratio
body: <p>In my program im trying to have video in full screen but without break aspect ratio of the playing video ,</p>
  
  <p><strong>in android default player it has button in upper left corner when you press it it shift video to full view without distortion of video which <em>maintain aspect ratio</em></strong>: </p>
  
  <p>as image below :</p>
  
  <p><img src="https://i.stack.imgur.com/ELM8x.png" alt="enter image description here"></p>
  
  <p>im try to get full screen video with the following code :</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_alignParentRight="true"
            android:layout_alignParentLeft="true" 
           android:layout_alignParentTop="true"
            android:layout_alignParentBottom="true" 
           android:layout_height="fill_parent"&gt; 
        &lt;/VideoView&gt; 
     &lt;/RelativeLayout&gt; 
  </code></pre>
  
  <p>This above code lead to full screen video <strong>BUT</strong> without maintain Aspest Ratio</p>
  
  <p>please can any body advice me in how to get full screen video Without Break Aspect Ratio .</p>
  
  <p>My videos stored in raw folder of  App resource folder .</p>
  
  <p><strong>please supply full working code</strong> .</p>
  
  <p>I searched alot here and in google but i cant find my target ,</p>
  
  <p>another post found here in stackoverflow with the same question but with no correct answer in this link :</p>
  
  <p><a href="https://stackoverflow.com/questions/12211837/full-screen-videoview-without-stretching-the-video#comment16405010_12211837">Full screen videoview without stretching the video</a> .</p>
  
  <p>im using videoview to display my videos in my App as follow:</p>
  
  <pre><code>  public class Video extends Activity {   
      private VideoView videoview;    
        @Override  
           public void onCreate(Bundle icicle) {  
                super.onCreate(icicle);      
                 setContentView(R.layout.main);   
     videoview = (VideoView) findViewById(R.id.count_videoview);  
     videoview.setVideoURI(Uri.parse("android.resource://" + getPackageName()
            +"/"+R.raw.first_video));    
     videoview.setMediaController(new MediaController(this));    
     videoview.requestFocus();    
     videoview.start();   
                   }
            } 
  </code></pre>
  
  <p>Thanks in advance .</p>