From 9e3719915d3d424c37774568c4381424d6919c4d Mon Sep 17 00:00:00 2001 From: Yining Liu Date: Wed, 22 Mar 2023 17:38:39 +0000 Subject: [PATCH] Fix text clipping of Notification actions, when the system font size is at maximum Fixes the visually clipped notification action text, when the Accessibility - Display size and text - font size is at its maximum(2.0 scale). Test: Manual. Go to Settings > Accessibility > Display size and text. Adjust the "Font size" to the biggest. Post a high-priority notification with reply button. The HUN's reply button text shouldn't be clipped. Then open the Shade. The notification's reply button text shouldn't be clipped. Bug: 273401782 Bug: 273356442 Change-Id: I7eec0aa37770c7d0d3ee99c6e69f0218fcc1c864 --- core/res/res/layout/notification_material_action.xml | 3 ++- core/res/res/layout/notification_material_action_list.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/res/res/layout/notification_material_action.xml b/core/res/res/layout/notification_material_action.xml index c024dbed56c0d..da515d788ce51 100644 --- a/core/res/res/layout/notification_material_action.xml +++ b/core/res/res/layout/notification_material_action.xml @@ -19,7 +19,8 @@ style="@android:style/NotificationAction" android:id="@+id/action0" android:layout_width="wrap_content" - android:layout_height="48dp" + android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_gravity="center" android:gravity="start|center_vertical" android:layout_marginStart="4dp" diff --git a/core/res/res/layout/notification_material_action_list.xml b/core/res/res/layout/notification_material_action_list.xml index 7aef82a8aa3a6..057270aa35df3 100644 --- a/core/res/res/layout/notification_material_action_list.xml +++ b/core/res/res/layout/notification_material_action_list.xml @@ -36,7 +36,8 @@ android:id="@+id/actions" android:layout_width="0dp" android:layout_weight="1" - android:layout_height="@dimen/notification_action_list_height" + android:layout_height="wrap_content" + android:minHeight="@dimen/notification_action_list_height" android:orientation="horizontal" android:gravity="center_vertical" android:visibility="gone"