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

Commit 9accf5eb authored by Julia Reynolds's avatar Julia Reynolds Committed by Automerger Merge Worker
Browse files

Merge "Update the notif expand button so it can be shared" into sc-dev am: 706bd974

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14188012

Change-Id: I00c732e7120f0dda1c21a61a197cb916e67949b1
parents a61f367f 706bd974
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -165,17 +165,25 @@ public class NotificationExpandButton extends FrameLayout {

    private void updateColors() {
        if (shouldShowNumber() && !mDisallowColor) {
            if (mHighlightPillColor != 0) {
                mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
            }
            mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
            mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN);
            if (mHighlightTextColor != 0) {
                mNumberView.setTextColor(mHighlightTextColor);
            }
        } else {
            if (mDefaultPillColor != 0) {
                mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
            }
            mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
            mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN);
            if (mDefaultTextColor != 0) {
                mNumberView.setTextColor(mDefaultTextColor);
            }
        }
    }

    private boolean shouldShowNumber() {
        return !mExpanded && mNumber > 1;
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
    android:layout_gravity="top|end"
    android:contentDescription="@string/expand_button_content_description_collapsed"
    android:padding="16dp"
    android:visibility="gone"
    >

    <LinearLayout
@@ -40,6 +39,7 @@
            android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Info"
            android:gravity="center_vertical"
            android:paddingStart="8dp"
            android:visibility="gone"
            />

        <ImageView
+2 −0
Original line number Diff line number Diff line
@@ -4339,4 +4339,6 @@
  <java-symbol type="drawable" name="ic_accessibility_24dp" />
  <java-symbol type="string" name="view_and_control_notification_title" />
  <java-symbol type="string" name="view_and_control_notification_content" />

  <java-symbol type="layout" name="notification_expand_button"/>
</resources>