@Override protected void onFinishInflate() { super.onFinishInflate(); View.inflate(getContext(), R.layout.noplayer_view, this); videoFrame = (AspectRatioFrameLayout) findViewById(R.id.video_frame); shutterView = findViewById(R.id.shutter); surfaceView = (SurfaceView) findViewById(R.id.surface_view); surfaceView.getHolder().addCallback(surfaceHolderProvider); subtitleView = (SubtitleView) findViewById(R.id.subtitles_layout); }
@SuppressWarnings("ResourceType") private static void setResizeModeRaw(AspectRatioFrameLayout aspectRatioFrame, int resizeMode) { aspectRatioFrame.setResizeMode(resizeMode); }
private void adjustSurfaceView() { simpleExoPlayerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL); }
/** * Sets the resize mode. * * @param resizeMode The resize mode. */ public void setResizeMode(@AspectRatioFrameLayout.ResizeMode int resizeMode) { Assertions.checkState(contentFrame != null); contentFrame.setResizeMode(resizeMode); }