Loading packages/SystemUI/res/drawable/magic_action_button_background.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:color="@color/notification_ripple_untinted_color"> <item> <inset android:insetBottom="8dp" android:insetLeft="0dp" android:insetRight="0dp" android:insetTop="8dp"> <shape android:shape="rectangle"> <corners android:radius="@dimen/magic_action_button_corner_radius" /> <solid android:color="@androidprv:color/materialColorPrimaryContainer" /> <stroke android:width="@dimen/magic_action_button_outline_stroke_width" android:color="@androidprv:color/materialColorOutlineVariant" /> </shape> </inset> </item> </ripple> packages/SystemUI/res/layout/magic_action_button.xml +15 −18 Original line number Diff line number Diff line <Button xmlns:android="http://schemas.android.com/apk/res/android" style="@android:style/Widget.Material.Button" android:stateListAnimator="@null" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="0dp" android:minHeight="@dimen/smart_reply_button_min_height" android:paddingVertical="@dimen/smart_reply_button_padding_vertical" android:background="@drawable/smart_reply_button_background" android:layout_height="@dimen/magic_action_button_touch_target_height" android:background="@drawable/magic_action_button_background" android:drawablePadding="@dimen/magic_action_button_drawable_padding" android:ellipsize="none" android:fontFamily="google-sans-flex" android:gravity="center" android:fontFamily="roboto-medium" android:textSize="@dimen/smart_reply_button_font_size" android:lineSpacingExtra="@dimen/smart_reply_button_line_spacing_extra" android:textColor="@color/smart_reply_button_text" android:paddingStart="@dimen/smart_reply_button_action_padding_left" android:paddingEnd="@dimen/smart_reply_button_padding_horizontal" android:drawablePadding="@dimen/smart_action_button_icon_padding" android:textStyle="normal" android:ellipsize="none"/> android:minWidth="0dp" android:paddingHorizontal="@dimen/magic_action_button_padding_horizontal" android:paddingVertical="@dimen/magic_action_button_inset_vertical" android:stateListAnimator="@null" android:textColor="@color/magic_action_button_text_color" android:textSize="@dimen/magic_action_button_font_size" android:textStyle="normal" /> packages/SystemUI/res/values/colors.xml +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ <color name="smart_reply_button_background">#ffffffff</color> <color name="smart_reply_button_stroke">@*android:color/accent_device_default</color> <!-- Magic Action colors --> <color name="magic_action_button_text_color">@androidprv:color/materialColorOnSurfaceVariant</color> <!-- Biometric dialog colors --> <color name="biometric_dialog_gray">#ff757575</color> <color name="biometric_dialog_accent">@color/material_dynamic_primary40</color> Loading packages/SystemUI/res/values/dimens.xml +11 −0 Original line number Diff line number Diff line Loading @@ -1129,6 +1129,17 @@ <dimen name="smart_action_button_icon_padding">8dp</dimen> <dimen name="smart_action_button_outline_stroke_width">2dp</dimen> <!-- Magic Action params. --> <!-- Corner radius = half of min_height to create rounded sides. --> <dimen name="magic_action_button_corner_radius">16dp</dimen> <dimen name="magic_action_button_icon_size">20dp</dimen> <dimen name="magic_action_button_outline_stroke_width">1dp</dimen> <dimen name="magic_action_button_padding_horizontal">12dp</dimen> <dimen name="magic_action_button_inset_vertical">8dp</dimen> <dimen name="magic_action_button_drawable_padding">8dp</dimen> <dimen name="magic_action_button_touch_target_height">48dp</dimen> <dimen name="magic_action_button_font_size">12sp</dimen> <!-- A reasonable upper bound for the height of the smart reply button. The measuring code needs to start with a guess for the maximum size. Currently two-line smart reply buttons add about 88dp of height to the notifications. --> Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyStateInflater.kt +0 −10 Original line number Diff line number Diff line Loading @@ -409,16 +409,6 @@ constructor( as Button) .apply { text = action.title // TODO: Move the MagicActionBackgroundDrawable to MagicActionButton once // MagicActionButton is created. if (isMagicAction) { background = MagicActionBackgroundDrawable(parent.context) val textColor = parent.context.getColor( com.android.internal.R.color.materialColorOnPrimaryContainer ) setTextColor(textColor) } // We received the Icon from the application - so use the Context of the application // to Loading Loading
packages/SystemUI/res/drawable/magic_action_button_background.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:color="@color/notification_ripple_untinted_color"> <item> <inset android:insetBottom="8dp" android:insetLeft="0dp" android:insetRight="0dp" android:insetTop="8dp"> <shape android:shape="rectangle"> <corners android:radius="@dimen/magic_action_button_corner_radius" /> <solid android:color="@androidprv:color/materialColorPrimaryContainer" /> <stroke android:width="@dimen/magic_action_button_outline_stroke_width" android:color="@androidprv:color/materialColorOutlineVariant" /> </shape> </inset> </item> </ripple>
packages/SystemUI/res/layout/magic_action_button.xml +15 −18 Original line number Diff line number Diff line <Button xmlns:android="http://schemas.android.com/apk/res/android" style="@android:style/Widget.Material.Button" android:stateListAnimator="@null" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="0dp" android:minHeight="@dimen/smart_reply_button_min_height" android:paddingVertical="@dimen/smart_reply_button_padding_vertical" android:background="@drawable/smart_reply_button_background" android:layout_height="@dimen/magic_action_button_touch_target_height" android:background="@drawable/magic_action_button_background" android:drawablePadding="@dimen/magic_action_button_drawable_padding" android:ellipsize="none" android:fontFamily="google-sans-flex" android:gravity="center" android:fontFamily="roboto-medium" android:textSize="@dimen/smart_reply_button_font_size" android:lineSpacingExtra="@dimen/smart_reply_button_line_spacing_extra" android:textColor="@color/smart_reply_button_text" android:paddingStart="@dimen/smart_reply_button_action_padding_left" android:paddingEnd="@dimen/smart_reply_button_padding_horizontal" android:drawablePadding="@dimen/smart_action_button_icon_padding" android:textStyle="normal" android:ellipsize="none"/> android:minWidth="0dp" android:paddingHorizontal="@dimen/magic_action_button_padding_horizontal" android:paddingVertical="@dimen/magic_action_button_inset_vertical" android:stateListAnimator="@null" android:textColor="@color/magic_action_button_text_color" android:textSize="@dimen/magic_action_button_font_size" android:textStyle="normal" />
packages/SystemUI/res/values/colors.xml +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ <color name="smart_reply_button_background">#ffffffff</color> <color name="smart_reply_button_stroke">@*android:color/accent_device_default</color> <!-- Magic Action colors --> <color name="magic_action_button_text_color">@androidprv:color/materialColorOnSurfaceVariant</color> <!-- Biometric dialog colors --> <color name="biometric_dialog_gray">#ff757575</color> <color name="biometric_dialog_accent">@color/material_dynamic_primary40</color> Loading
packages/SystemUI/res/values/dimens.xml +11 −0 Original line number Diff line number Diff line Loading @@ -1129,6 +1129,17 @@ <dimen name="smart_action_button_icon_padding">8dp</dimen> <dimen name="smart_action_button_outline_stroke_width">2dp</dimen> <!-- Magic Action params. --> <!-- Corner radius = half of min_height to create rounded sides. --> <dimen name="magic_action_button_corner_radius">16dp</dimen> <dimen name="magic_action_button_icon_size">20dp</dimen> <dimen name="magic_action_button_outline_stroke_width">1dp</dimen> <dimen name="magic_action_button_padding_horizontal">12dp</dimen> <dimen name="magic_action_button_inset_vertical">8dp</dimen> <dimen name="magic_action_button_drawable_padding">8dp</dimen> <dimen name="magic_action_button_touch_target_height">48dp</dimen> <dimen name="magic_action_button_font_size">12sp</dimen> <!-- A reasonable upper bound for the height of the smart reply button. The measuring code needs to start with a guess for the maximum size. Currently two-line smart reply buttons add about 88dp of height to the notifications. --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyStateInflater.kt +0 −10 Original line number Diff line number Diff line Loading @@ -409,16 +409,6 @@ constructor( as Button) .apply { text = action.title // TODO: Move the MagicActionBackgroundDrawable to MagicActionButton once // MagicActionButton is created. if (isMagicAction) { background = MagicActionBackgroundDrawable(parent.context) val textColor = parent.context.getColor( com.android.internal.R.color.materialColorOnPrimaryContainer ) setTextColor(textColor) } // We received the Icon from the application - so use the Context of the application // to Loading