From bf5b7b2dd39277222d31d8115fb3b8094b72ffb5 Mon Sep 17 00:00:00 2001 From: tomnatan Date: Wed, 2 Feb 2022 11:43:26 +0000 Subject: [PATCH] [5/n] Letterbox Education: update the dialog layout. In addition, remove the overlay layout and include it in the dialog layout as the background of the top-level layout (renamed as dimmer). Test: N/A Bug: 207010227 Change-Id: I658e85378ec266c4260b520b5fcdddbfb66b35c6 --- ...letterbox_education_dialog_background.xml} | 13 ++-- ...x_education_dismiss_button_background.xml} | 2 +- ...tion_dismiss_button_background_ripple.xml} | 3 +- ...letterbox_education_ic_letterboxed_app.xml | 29 +++++++++ .../letterbox_education_dialog_layout.xml | 59 +++++++++--------- .../WindowManager/Shell/res/values/colors.xml | 1 + libs/WindowManager/Shell/res/values/dimen.xml | 8 +-- .../Shell/res/values/strings.xml | 15 ++--- .../wm/shell/compatui/CompatUILayout.java | 2 +- .../LetterboxEduDialogActionLayout.java | 24 ++------ .../LetterboxEduDialogLayout.java | 61 +++++++------------ 11 files changed, 102 insertions(+), 115 deletions(-) rename libs/WindowManager/Shell/res/{layout/letterbox_education_overlay_layout.xml => drawable/letterbox_education_dialog_background.xml} (70%) rename libs/WindowManager/Shell/res/drawable/{letterbox_education_dismiss_background.xml => letterbox_education_dismiss_button_background.xml} (91%) rename libs/WindowManager/Shell/res/drawable/{letterbox_education_dismiss_background_ripple.xml => letterbox_education_dismiss_button_background_ripple.xml} (92%) create mode 100644 libs/WindowManager/Shell/res/drawable/letterbox_education_ic_letterboxed_app.xml diff --git a/libs/WindowManager/Shell/res/layout/letterbox_education_overlay_layout.xml b/libs/WindowManager/Shell/res/drawable/letterbox_education_dialog_background.xml similarity index 70% rename from libs/WindowManager/Shell/res/layout/letterbox_education_overlay_layout.xml rename to libs/WindowManager/Shell/res/drawable/letterbox_education_dialog_background.xml index f4c6d65bad055..3e1a2bce23932 100644 --- a/libs/WindowManager/Shell/res/layout/letterbox_education_overlay_layout.xml +++ b/libs/WindowManager/Shell/res/drawable/letterbox_education_dialog_background.xml @@ -14,11 +14,8 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + + + + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background.xml b/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background.xml similarity index 91% rename from libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background.xml rename to libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background.xml index 723963ff8c9ad..0d8811357c058 100644 --- a/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background.xml +++ b/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background.xml @@ -16,6 +16,6 @@ --> - + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background_ripple.xml b/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background_ripple.xml similarity index 92% rename from libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background_ripple.xml rename to libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background_ripple.xml index 0a3a81302a49b..0d8a8faa97983 100644 --- a/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_background_ripple.xml +++ b/libs/WindowManager/Shell/res/drawable/letterbox_education_dismiss_button_background_ripple.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/drawable/letterbox_education_ic_letterboxed_app.xml b/libs/WindowManager/Shell/res/drawable/letterbox_education_ic_letterboxed_app.xml new file mode 100644 index 0000000000000..6fcd1de892a30 --- /dev/null +++ b/libs/WindowManager/Shell/res/drawable/letterbox_education_ic_letterboxed_app.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml b/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml index edf737fcc86ad..fc6ea9a57e10d 100644 --- a/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml +++ b/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml @@ -13,30 +13,31 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + android:background="@android:color/system_neutral1_900"> + + - + android:orientation="vertical" + android:background="@drawable/letterbox_education_dialog_background" + android:padding="24dp"> + android:layout_marginBottom="12dp" + android:src="@drawable/letterbox_education_ic_letterboxed_app"/> + + + android:paddingTop="48dp"> + app:icon="@drawable/letterbox_education_ic_screen_rotation" + app:text="@string/letterbox_education_screen_rotation_text"/> - -