Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df7223b8 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Simplify SmartReplyView padding layout logic

The horizontal padding used to be dynamic based on the number of lines, but that hasn't been true for a while.  The new goal is for padding to always be 16dp, except that the action icon is in the middle of that.

Fixes: 78876518
Test: manual visual inspection with notify
Test: atest SmartReplyViewTest
Change-Id: I11400a552cab99d9f0ae31024d5973772e8ea300
parent 0ffd1564
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@
        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:paddingLeft="@dimen/smart_reply_button_action_padding_left"
        android:paddingRight="@dimen/smart_reply_button_padding_horizontal"
        android:drawablePadding="@dimen/smart_action_button_icon_padding"
        android:textStyle="normal"
        android:ellipsize="none"/>
+2 −0
Original line number Diff line number Diff line
@@ -31,5 +31,7 @@
        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:paddingLeft="@dimen/smart_reply_button_padding_horizontal"
        android:paddingRight="@dimen/smart_reply_button_padding_horizontal"
        android:textStyle="normal"
        android:ellipsize="none"/>
+0 −2
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    systemui:spacing="@dimen/smart_reply_button_spacing"
    systemui:singleLineButtonPaddingHorizontal="@dimen/smart_reply_button_padding_horizontal_single_line"
    systemui:doubleLineButtonPaddingHorizontal="@dimen/smart_reply_button_padding_horizontal_double_line"
    systemui:buttonStrokeWidth="@dimen/smart_reply_button_stroke_width">
    <!-- smart_reply_button(s) will be added here. -->
</com.android.systemui.statusbar.policy.SmartReplyView>
+0 −2
Original line number Diff line number Diff line
@@ -131,8 +131,6 @@

    <declare-styleable name="SmartReplyView">
        <attr name="spacing" format="dimension" />
        <attr name="singleLineButtonPaddingHorizontal" format="dimension" />
        <attr name="doubleLineButtonPaddingHorizontal" format="dimension" />
        <attr name="buttonStrokeWidth" format="dimension" />
    </declare-styleable>

+2 −3
Original line number Diff line number Diff line
@@ -1147,9 +1147,8 @@
    <!-- Smart reply button. Total height 48dp, visible height 32dp. -->
    <dimen name="smart_reply_button_spacing">8dp</dimen>
    <dimen name="smart_reply_button_padding_vertical">14dp</dimen>
    <!-- Note: The following two paddings need to be different until b/78876518 is fixed. -->
    <dimen name="smart_reply_button_padding_horizontal_single_line">16dp</dimen>
    <dimen name="smart_reply_button_padding_horizontal_double_line">15dp</dimen>
    <dimen name="smart_reply_button_padding_horizontal">16dp</dimen>
    <dimen name="smart_reply_button_action_padding_left">8dp</dimen>
    <dimen name="smart_reply_button_min_height">48dp</dimen>
    <dimen name="smart_reply_button_stroke_width">1dp</dimen>
    <dimen name="smart_reply_button_font_size">14sp</dimen>
Loading