ソースを参照

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>
Daniel Calviño Sánchez 2 年 前
コミット
892ffe87dd

+ 2 - 2
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);
             }