From 18992e982f4248f58cbb247dc6072ba43d0bb0ab Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Thu, 5 May 2022 14:55:52 -0400 Subject: [PATCH] Don't use a scrollable dialog for CastDialog Cast dialog needs to display a ListView that may be scrollable. ListView does not play well inside a NestedScrollView. As a low risk solution, special case the style for this dialog to not use NestedScrollView. Test: manual Fixes: 230517187 Change-Id: I29eb27050c39915ee16f81b83abb8dae781f9588 --- .../res/layout/alert_dialog_systemui.xml | 132 +++++++++--------- .../scrollable_alert_dialog_systemui.xml | 25 ++++ packages/SystemUI/res/values/styles.xml | 7 +- 3 files changed, 94 insertions(+), 70 deletions(-) create mode 100644 packages/SystemUI/res/layout/scrollable_alert_dialog_systemui.xml diff --git a/packages/SystemUI/res/layout/alert_dialog_systemui.xml b/packages/SystemUI/res/layout/alert_dialog_systemui.xml index 528f603c6a83a..fd06238127454 100644 --- a/packages/SystemUI/res/layout/alert_dialog_systemui.xml +++ b/packages/SystemUI/res/layout/alert_dialog_systemui.xml @@ -1,7 +1,6 @@ - - - + + + + + android:minHeight="48dp" + android:paddingStart="@dimen/dialog_side_padding" + android:paddingEnd="@dimen/dialog_side_padding" + > - - - + android:clipToPadding="false"> - + android:orientation="vertical"> - + + + style="@style/TextAppearance.Dialog.Body.Message" /> - + + + + - - - - - - + + + + + - - - - - - - - - - \ No newline at end of file + layout="@layout/alert_dialog_button_bar_systemui" /> + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/scrollable_alert_dialog_systemui.xml b/packages/SystemUI/res/layout/scrollable_alert_dialog_systemui.xml new file mode 100644 index 0000000000000..71bb938dfdf4f --- /dev/null +++ b/packages/SystemUI/res/layout/scrollable_alert_dialog_systemui.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index c93c0652a070b..f2b263e219308 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -380,7 +380,7 @@ @style/Widget.Dialog.Button.BorderButton @style/Widget.Dialog.Button.BorderButton ?androidprv:attr/colorSurface - @style/AlertDialogStyle + @style/ScrollableAlertDialogStyle @style/ButtonBarStyle @style/Widget.Dialog.Button.Large @@ -389,6 +389,10 @@ @layout/alert_dialog_systemui + +