Fix fullscreen scaling in AppRTCMobile.
The surface view renderer size was set to match parent so it couldn't adjust based on the frame size. The size is now set to wrap_content which allows the renderer to adjust. The root element of the call activity is changed to FrameLayout to allow the renderer to center. requestLayout is added to SurfaceView setScalingType so onMeasure gets called again. BUG=webrtc:7901 Review-Url: https://codereview.webrtc.org/2978173002 Cr-Commit-Position: refs/heads/master@{#19073}
This commit is contained in:
@ -164,12 +164,14 @@ public class SurfaceViewRenderer
|
||||
public void setScalingType(RendererCommon.ScalingType scalingType) {
|
||||
ThreadUtils.checkIsOnMainThread();
|
||||
videoLayoutMeasure.setScalingType(scalingType);
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
public void setScalingType(RendererCommon.ScalingType scalingTypeMatchOrientation,
|
||||
RendererCommon.ScalingType scalingTypeMismatchOrientation) {
|
||||
ThreadUtils.checkIsOnMainThread();
|
||||
videoLayoutMeasure.setScalingType(scalingTypeMatchOrientation, scalingTypeMismatchOrientation);
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user