title: In Android, using exoplayer, how to fill surfaceview with a video that does not have the same aspect ratio with the device?
body: <p>I have an activity that uses ExoPlayer to play a video. When I go fullscreen, unless the aspect ratio of the device is equal to that of the video, I get small black bars at the top and the bottom of the video.</p>
  
  <p>This is how the layout looks :</p>
  
  <pre><code>&lt;com.google.android.exoplayer.AspectRatioFrameLayout
      android:id="@+id/video_frame"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"&gt;
  
      &lt;SurfaceView android:id="@+id/surface_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_gravity="fill_vertical"/&gt;
  
      &lt;View android:id="@+id/shutter"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@android:color/black"/&gt;
  
  &lt;/com.google.android.exoplayer.AspectRatioFrameLayout&gt;
  </code></pre>
  
  <p>I was hoping that </p>
  
  <pre><code>aspectRatioFrameLayout.setAspectRatio(mVideo.getAspectRatio());
  </code></pre>
  
  <p>would solve the problem, but I had no success. 
  Is there a way to fill the screen with the video, even if part of the video is cut off from the screen?</p>