Fix self video size after coming back from PiP mode

When coming back from PiP mode the self video occupied the full height
of the window. Now the height is set to the default value set in the
layout, so it matches the size used when starting the call activity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-09-15 20:59:53 +02:00
parent 85c644e5b3
commit 892ffe87dd

View file

@ -2029,11 +2029,11 @@ public class CallActivity extends CallBaseActivity {
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
layoutParams.height = (int) getResources().getDimension(R.dimen.call_self_video_short_side_length);
layoutParams.width = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams.width = (int) getResources().getDimension(R.dimen.call_self_video_long_side_length);
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.call_self_video_short_side_length) * 0.8);
} else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
layoutParams.height = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams.height = (int) getResources().getDimension(R.dimen.call_self_video_long_side_length);
layoutParams.width = (int) getResources().getDimension(R.dimen.call_self_video_short_side_length);
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.call_self_video_short_side_length) * 0.5);
}