Allow long-press lockscreen popup to be wider.

To reduce the chances of needing to truncate the text in the lockscreen
long-press popup button, places the button z-order "above" the left and
right lockscreen shortcuts.

Please see screenshots at b/279675855#comment16

Fix: 279675855
Test: manually verified that the popup shows properly, in the middle,
between the two lockscreen shortcuts when the font size setting is set
to smallest, default, and largest, on a Pixel 7. Also made sure that
clicking the popup still goes to the lockscreen customization screen,
that the lockscreen shortcuts can still be interacted with, etc.

Change-Id: Ia95a9e11ea5be70960fc45a26271f15c0623b8ad
This commit is contained in:
Alejandro Nijamkin
2023-05-12 14:04:25 -07:00
parent d373da3cba
commit 8f103668a3

View File

@@ -59,55 +59,44 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom"
android:layout_marginHorizontal="@dimen/keyguard_affordance_horizontal_offset"
<com.android.systemui.animation.view.LaunchableImageView
android:id="@+id/start_button"
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
android:layout_gravity="start|bottom"
android:layout_marginStart="@dimen/keyguard_affordance_horizontal_offset"
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
android:gravity="bottom"
>
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:visibility="invisible" />
<com.android.systemui.animation.view.LaunchableImageView
android:id="@+id/start_button"
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
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:visibility="invisible" />
<com.android.systemui.animation.view.LaunchableImageView
android:id="@+id/end_button"
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
android:layout_gravity="end|bottom"
android:layout_marginEnd="@dimen/keyguard_affordance_horizontal_offset"
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
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:visibility="invisible" />
<FrameLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:paddingHorizontal="24dp"
>
<include
android:id="@+id/keyguard_settings_button"
layout="@layout/keyguard_settings_popup_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
/>
</FrameLayout>
<com.android.systemui.animation.view.LaunchableImageView
android:id="@+id/end_button"
android:layout_height="@dimen/keyguard_affordance_fixed_height"
android:layout_width="@dimen/keyguard_affordance_fixed_width"
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:visibility="invisible" />
</LinearLayout>
<include
android:id="@+id/keyguard_settings_button"
layout="@layout/keyguard_settings_popup_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
android:layout_marginHorizontal="@dimen/keyguard_affordance_horizontal_offset"
android:visibility="gone"
/>
<FrameLayout
android:id="@+id/overlay_container"