title: Android: Can I crop a video in aspect radio to fullscreen?
body: <p>I have learn how to resize video playing on this <a href="https://stackoverflow.com/questions/12211837/full-screen-videoview-without-stretching-the-video">Full screen videoview without stretching the video</a> .</p>
  
  <p>With <code>gameowner</code> answer, it works. And it also force to keep aspect radio such that it will end up with black stripes in the sides.</p>
  
  <p>I would like to have another optional. That is I do not want to have black stripes in the sides. I would like the video height is still remain in screen height. To keep aspect radio, the video width should greater than screen width. It doesn't matter that I cannot watch the "most left part" and "most right part" of video.
  I think I just need to change from:</p>
  
  <pre><code>if (videoProportion &gt; screenProportion) {
          lp.width = screenWidth;
          lp.height = (int) ((float) screenWidth / videoProportion);
  } else {
          lp.width = (int) (videoProportion * (float) screenHeight);
          lp.height = screenHeight;
  }
  </code></pre>
  
  <p>to</p>
  
  <pre><code>if (videoProportion &lt; screenProportion) {
          lp.width = screenWidth;
          lp.height = (int) ((float) screenWidth / videoProportion);
  } else {
          lp.width = (int) (videoProportion * (float) screenHeight);
          lp.height = screenHeight;
  }
  </code></pre>
  
  <p>would be ok but I didn't. 
  Once the <code>surfaceView</code> size is larger than the screen. This just show black screen but keep aduio playing.</p>
  
  <p>I also try to take surfaceview holder fixed size into account:</p>
  
  <pre><code>surfaceViewFrame.getHolder().setFixedSize(lp.width, lp.height);
  </code></pre>
  
  <p>but it does not solve the problem.
  Is it possible to play video which size is greater than screen?</p>
  
  <p><strong>Edit:</strong> OK. I have realized that the term of my question. I would like to <strong>zoom-in</strong> my video in aspect radio and but in fullscreen. Also known as <strong>crop</strong> video to fullscreen.</p>
  
  <p>I tried to use <code>TextureView</code> inside a <code>FrameLayout</code> (required) container:
  <a href="https://stackoverflow.com/questions/10736517/playing-video-on-textureview">Playing video on TextureView</a>
  I have Android 4.0 devices that work fine in this workaround but I am not sure it really work on other 4.0 devices. Also <code>TextureView</code> is Android 4.0 or above only. I would be grateful if there is workaround for Android 2.x.</p>