Rename dimension to better describe its purpose

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:58:26 +02:00
parent 53e3543839
commit a605c5df9f
3 changed files with 6 additions and 6 deletions

View file

@ -2028,14 +2028,14 @@ public class CallActivity extends CallBaseActivity {
}
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
layoutParams.height = (int) getResources().getDimension(R.dimen.large_preview_dimension);
layoutParams.height = (int) getResources().getDimension(R.dimen.call_self_video_short_side_length);
layoutParams.width = FrameLayout.LayoutParams.WRAP_CONTENT;
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.large_preview_dimension) * 0.8);
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.width = (int) getResources().getDimension(R.dimen.large_preview_dimension);
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.large_preview_dimension) * 0.5);
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);
}
binding.selfVideoRenderer.setLayoutParams(layoutParams);

View file

@ -61,7 +61,7 @@
<org.webrtc.SurfaceViewRenderer
android:id="@+id/selfVideoRenderer"
android:layout_width="@dimen/large_preview_dimension"
android:layout_width="@dimen/call_self_video_short_side_length"
android:layout_height="150dp"
android:layout_gravity="center"
android:layout_margin="16dp"

View file

@ -46,7 +46,6 @@
<dimen name="maximum_file_preview_size">192dp</dimen>
<dimen name="large_preview_dimension">80dp</dimen>
<dimen name="corner_radius">16dp</dimen>
<dimen name="button_corner_radius">24dp</dimen>
<dimen name="standard_margin">16dp</dimen>
@ -64,6 +63,7 @@
<dimen name="dialog_padding">24dp</dimen>
<dimen name="dialog_padding_top_bottom">18dp</dimen>
<dimen name="call_self_video_short_side_length">80dp</dimen>
<dimen name="call_grid_item_min_height">180dp</dimen>
<dimen name="call_controls_height">110dp</dimen>
<dimen name="zero">0dp</dimen>