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:
sakal
2017-07-18 05:01:08 -07:00
committed by Commit Bot
parent b0b721a68c
commit fcf97c3b75
2 changed files with 14 additions and 4 deletions

View File

@ -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();
}
/**