From c989a1b38c248994e870cca917b443865096b109 Mon Sep 17 00:00:00 2001 From: tomnatan Date: Thu, 10 Feb 2022 13:31:48 +0000 Subject: [PATCH] [13/n] Letterbox Education: change dialog width and handle oveflow cases. We set the dialog width to the maximum between 472dp (to be consistent with the standard android dialog width) and the task width minus margin. We also add a 16dp margin between the dialog container and the task stable bounds (task bound excluding insets). Overflow in width will be handled by texts wraping to multiple lines and overflow in height will be handled by making the dialog scrollable. In addition, a 500ms start delay is added to enter animation. Bug: 215314668 Test: N/A Change-Id: I4b11096e124ae8632bff6390700e7519acdcefa0 --- .../letterbox_education_dialog_layout.xml | 158 ++++++++++-------- libs/WindowManager/Shell/res/values/dimen.xml | 9 +- .../shell/compatui/CompatUIWindowManager.java | 11 +- .../CompatUIWindowManagerAbstract.java | 70 ++++---- .../LetterboxEduAnimationController.java | 5 + .../LetterboxEduDialogLayout.java | 5 +- .../LetterboxEduWindowManager.java | 34 +++- 7 files changed, 174 insertions(+), 118 deletions(-) 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 5beaa8798247d..95923763d889c 100644 --- a/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml +++ b/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml @@ -22,81 +22,101 @@ - - + android:alpha="0" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintWidth_max="@dimen/letterbox_education_dialog_width" + app:layout_constrainedHeight="true"> - - - - - - - - - - - - - - -