From e811fcd5f7797efdc59d30223a5e46b59c74569b Mon Sep 17 00:00:00 2001 From: Joshua McCloskey <joshmccloskey@google.com> Date: Wed, 1 May 2024 00:55:58 +0000 Subject: [PATCH] Fixed side fps notification for large text Test: Manually verified content no longer overflows on various font sizes (1, 1.2, 1.6, 2, 3) Test: adb shell settings put system font_scale (1, 1.2, 1.6, 2, 3) Fixes: 315424526 Change-Id: Iffe3a0542fbdbae7f5b464c2ef30967ecf3990a0 --- core/res/res/layout/side_fps_toast.xml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/res/res/layout/side_fps_toast.xml b/core/res/res/layout/side_fps_toast.xml index 96860b050393..2c35c9b888cf 100644 --- a/core/res/res/layout/side_fps_toast.xml +++ b/core/res/res/layout/side_fps_toast.xml @@ -18,28 +18,26 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:minWidth="350dp" android:layout_gravity="center" + android:minWidth="350dp" android:background="@color/side_fps_toast_background"> <TextView - android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="6" android:text="@string/fp_power_button_enrollment_title" - android:singleLine="true" - android:ellipsize="end" android:textColor="@color/side_fps_text_color" android:paddingLeft="20dp"/> <Space - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_weight="1"/> + android:layout_width="5dp" + android:layout_height="match_parent" /> <Button android:id="@+id/turn_off_screen" - android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="3" android:text="@string/fp_power_button_enrollment_button_text" - android:paddingRight="20dp" style="?android:attr/buttonBarNegativeButtonStyle" android:textColor="@color/side_fps_button_color" - android:maxLines="1"/> + /> </LinearLayout> \ No newline at end of file -- GitLab