Merge "Fix text clipping of EmphasizedNotificationButton, when the system font size is at maximum" into udc-dev

This commit is contained in:
Yining Liu
2023-03-24 20:31:34 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 3 deletions

View File

@@ -361,13 +361,15 @@ public class NotificationActionListLayout extends LinearLayout {
// same padding on bottom and at end
int paddingBottom = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.notification_content_margin_end);
height = mEmphasizedHeight;
int buttonPaddingInternal = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.button_inset_vertical_material);
setPaddingRelative(getPaddingStart(),
paddingTop - buttonPaddingInternal,
getPaddingEnd(),
paddingBottom - buttonPaddingInternal);
setMinimumHeight(mEmphasizedHeight);
height = ViewGroup.LayoutParams.WRAP_CONTENT;
} else {
setPaddingRelative(getPaddingStart(),
mDefaultPaddingTop,

View File

@@ -19,7 +19,8 @@
style="@style/NotificationEmphasizedAction"
android:id="@+id/action0"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/notification_action_emphasized_height"
android:layout_marginStart="12dp"
android:drawablePadding="6dp"
android:gravity="center"

View File

@@ -20,7 +20,8 @@
style="@style/NotificationEmphasizedAction"
android:id="@+id/action0"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/notification_action_emphasized_height"
android:layout_marginStart="12dp"
android:drawablePadding="6dp"
android:enabled="false"