From 892ffe87dd45a61e8e84769af3f18f4e89ea08e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= <danxuliu@gmail.com> Date: Thu, 15 Sep 2022 20:59:53 +0200 Subject: [PATCH] Fix self video size after coming back from PiP mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- .../main/java/com/nextcloud/talk/activities/CallActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 365442a34..a9c5edf42 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -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); }