From 8d67255b57adf6d6eb4181b4897b816304953414 Mon Sep 17 00:00:00 2001 From: Alejandro Nijamkin Date: Fri, 7 Apr 2023 13:15:02 -0700 Subject: [PATCH] Long-press lock screen popup support for large font size. Changes the height of the popup from a fixed height that matches the lock screen shortcut button heights to a wrap_content to allow the popup to be taller if it needs to accommodate biggfer fonts. Also moves things around a bit to make sure the lock screen shortcuts and the popup are bottom aligned with each other, simplifying some of the layout properties as a result. Fix: 277279440 Test: manually tested the popup with both the biggest font size and the default font size. Made sure that the popup is always bottom aligned with the lock screen shortcuts and the text is properly seen (even if it's ellipsized). Change-Id: I924a15609d52c09ec028df1f7f62b6b9efeab1fe --- packages/SystemUI/res/layout/keyguard_bottom_area.xml | 11 ++++------- .../res/layout/keyguard_settings_popup_menu.xml | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml index c0f7029449a1b..e9acf3fa10c85 100644 --- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml +++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml @@ -64,20 +64,20 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="bottom" + android:layout_marginHorizontal="@dimen/keyguard_affordance_horizontal_offset" + android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset" + android:gravity="bottom" > @@ -100,14 +100,11 @@ android:id="@+id/end_button" android:layout_height="@dimen/keyguard_affordance_fixed_height" android:layout_width="@dimen/keyguard_affordance_fixed_width" - android:layout_gravity="bottom|end" android:scaleType="fitCenter" android:padding="@dimen/keyguard_affordance_fixed_padding" android:tint="?android:attr/textColorPrimary" android:background="@drawable/keyguard_bottom_affordance_bg" android:foreground="@drawable/keyguard_bottom_affordance_selected_border" - android:layout_marginEnd="@dimen/keyguard_affordance_horizontal_offset" - android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset" android:visibility="invisible" /> diff --git a/packages/SystemUI/res/layout/keyguard_settings_popup_menu.xml b/packages/SystemUI/res/layout/keyguard_settings_popup_menu.xml index 9d0d783d01131..65ee8b370f9b5 100644 --- a/packages/SystemUI/res/layout/keyguard_settings_popup_menu.xml +++ b/packages/SystemUI/res/layout/keyguard_settings_popup_menu.xml @@ -20,7 +20,8 @@ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" - android:layout_height="48dp" + android:layout_height="wrap_content" + android:minHeight="@dimen/keyguard_affordance_fixed_height" android:orientation="horizontal" android:gravity="center_vertical" android:background="@drawable/keyguard_settings_popup_menu_background"