Resize view to fit aspect ratio of video in Android ExoPlayer

Been playing with ExoPlayer in Android and trying to resize a view to fit the aspect ratio of the video being played, i.e. fill the view with the video. References: Change resize mode for ExoPlayer Change aspect ratio of SurfaceView for ExoPlayer video 5-part series on building video player using ExoPlayer import android.view.ViewGroup.LayoutParams; import com.google.android.exoplayer2.Player.EventListener; …