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

This commit is contained in:
Julia Reynolds
2021-04-14 19:06:34 +00:00
committed by Android (Google) Code Review
3 changed files with 15 additions and 5 deletions

View File

@@ -165,15 +165,23 @@ public class NotificationExpandButton extends FrameLayout {
private void updateColors() {
if (shouldShowNumber() && !mDisallowColor) {
mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
if (mHighlightPillColor != 0) {
mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
}
mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN);
mNumberView.setTextColor(mHighlightTextColor);
if (mHighlightTextColor != 0) {
mNumberView.setTextColor(mHighlightTextColor);
}
} else {
mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
if (mDefaultPillColor != 0) {
mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
}
mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN);
mNumberView.setTextColor(mDefaultTextColor);
if (mDefaultTextColor != 0) {
mNumberView.setTextColor(mDefaultTextColor);
}
}
}

View File

@@ -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

View File

@@ -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>