From b967f2c24fdd970dc6f811c592ab29128d8d5230 Mon Sep 17 00:00:00 2001 From: Galia Peycheva Date: Wed, 12 Aug 2020 17:14:55 +0200 Subject: [PATCH] Move the Tv volume dialog to a vertical layout The CL sets the gravity of the volume dialog for TVs to RIGHT|CENTER_VERTICAL. It does the following: 1. Remove unnecessary margins and paddings in volume_dialog.xml, which were either meant for phones or for the previous horizontal layout. The new layout is generic and can be used both for horizontal and vertical volume dialogs. 2. Adjust the elements in volume_dialog_row to the right,vertical ui Bug: 162302410 Test: m && flash && verify that the volume ui is vertical Change-Id: If55413f8c3ade1dcda594bcb765fa0ee9e30ee08 --- .../layout-land-television/volume_dialog.xml | 9 +---- .../volume_dialog_row.xml | 39 +++++++++---------- .../res/values-land-television/dimens.xml | 5 ++- .../res/values-television/integers.xml | 7 ++-- 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/packages/SystemUI/res/layout-land-television/volume_dialog.xml b/packages/SystemUI/res/layout-land-television/volume_dialog.xml index 56d847c6aa2e5..8179bf48e7ab7 100644 --- a/packages/SystemUI/res/layout-land-television/volume_dialog.xml +++ b/packages/SystemUI/res/layout-land-television/volume_dialog.xml @@ -24,23 +24,17 @@ diff --git a/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml b/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml index e9641936f3577..708dfd01975ac 100644 --- a/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml +++ b/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml @@ -16,8 +16,8 @@ - + + android:textSize="@dimen/tv_volume_number_text_size" + android:textColor="@color/accent_tint_color_selector"/> + android:layout_width="match_parent" + android:layout_height="@dimen/volume_dialog_row_height"> + android:rotation="270" /> - + android:tint="@color/accent_tint_color_selector" + android:soundEffectsEnabled="false" /> diff --git a/packages/SystemUI/res/values-land-television/dimens.xml b/packages/SystemUI/res/values-land-television/dimens.xml index 90fc652b05e96..8237919990deb 100644 --- a/packages/SystemUI/res/values-land-television/dimens.xml +++ b/packages/SystemUI/res/values-land-television/dimens.xml @@ -15,8 +15,9 @@ --> - - 252dp + + 200dp + 17dp 36dp 40dp 5dp diff --git a/packages/SystemUI/res/values-television/integers.xml b/packages/SystemUI/res/values-television/integers.xml index 91e83ccbbe791..587497edfdfb7 100644 --- a/packages/SystemUI/res/values-television/integers.xml +++ b/packages/SystemUI/res/values-television/integers.xml @@ -17,6 +17,7 @@ - 81 - \ No newline at end of file + Value 81 corresponds to BOTTOM|CENTER_HORIZONTAL. + Value 21 corresponds to RIGHT|CENTER_VERTICAL. --> + 21 +