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

Commit ed64a14c authored by Selim Cinek's avatar Selim Cinek
Browse files

Removed the notification action background

Also added conditional paddings when inline
replying, such that the layout looks good.
This refactors the overall layout design and ensures
that smart replies and other content that is on
the bottom are always visible.

Bug: 69168591
Test: add notification, reply, no action background
Change-Id: I83d3f0d2512f0cf8c8b9db0edc7b27cbb109aeb9
parent 76b9bb78
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -4587,7 +4587,8 @@ public class Notification implements Parcelable
            big.setViewVisibility(R.id.notification_material_reply_text_3, View.GONE);
            big.setTextViewText(R.id.notification_material_reply_text_3, null);

            big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target, 0);
            big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target,
                    R.dimen.notification_content_margin);
        }

        private RemoteViews applyStandardTemplateWithActions(int layoutId) {
@@ -4608,16 +4609,7 @@ public class Notification implements Parcelable
            if (N > 0) {
                big.setViewVisibility(R.id.actions_container, View.VISIBLE);
                big.setViewVisibility(R.id.actions, View.VISIBLE);
                if (p.ambient) {
                    big.setInt(R.id.actions, "setBackgroundColor", Color.TRANSPARENT);
                } else if (isColorized()) {
                    big.setInt(R.id.actions, "setBackgroundColor", getActionBarColor());
                } else {
                    big.setInt(R.id.actions, "setBackgroundColor", mContext.getColor(
                            R.color.notification_action_list));
                }
                big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target,
                        R.dimen.notification_action_list_height);
                big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target, 0);
                if (N>MAX_ACTION_BUTTONS) N=MAX_ACTION_BUTTONS;
                for (int i=0; i<N; i++) {
                    Action action = mActions.get(i);
+0 −2
Original line number Diff line number Diff line
@@ -24,11 +24,9 @@
            android:layout_width="match_parent"
            android:layout_height="@dimen/notification_action_list_height"
            android:paddingEnd="12dp"
            android:paddingStart="8dp"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:visibility="gone"
            android:background="@color/notification_action_list"
            >
        <!-- actions will be added here -->
    </com.android.internal.widget.NotificationActionListLayout>
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@
            android:layout_width="match_parent"
            android:layout_height="1dip"
            android:id="@+id/action_divider"
            android:layout_marginBottom="15dp"
            android:layout_marginTop="@dimen/notification_content_margin"
            android:layout_marginBottom="@dimen/notification_content_margin"
            android:background="@drawable/notification_template_divider" />

    <TextView
@@ -53,7 +54,6 @@
            android:id="@+id/notification_material_reply_text_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="15dp"
            android:layout_marginEnd="@dimen/notification_content_margin_end"
            android:textAppearance="@style/TextAppearance.Material.Notification.Reply"
            android:singleLine="true" />
+0 −1
Original line number Diff line number Diff line
@@ -88,7 +88,6 @@
            android:orientation="horizontal"
            android:gravity="center"
            android:visibility="gone"
            android:background="@color/notification_action_list"
        />
    </FrameLayout>
</FrameLayout>
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
        android:layout_marginStart="@dimen/notification_content_margin_start"
        android:layout_marginEnd="@dimen/notification_content_margin_end"
        android:layout_marginTop="@dimen/notification_content_margin_top"
        android:layout_marginBottom="@dimen/notification_content_margin_bottom"
        android:layout_marginBottom="@dimen/notification_content_margin"
        android:orientation="vertical" >
        <include layout="@layout/notification_template_part_line1" />
        <include layout="@layout/notification_template_text" />
@@ -42,7 +42,7 @@
        <include layout="@layout/notification_template_smart_reply_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/notification_content_margin_bottom" />
            android:layout_marginTop="@dimen/notification_content_margin" />
    </LinearLayout>
    <include layout="@layout/notification_template_right_icon" />
</FrameLayout>
Loading