浏览代码

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
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

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