Merge "Update the notif expand button so it can be shared" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
706bd974d1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user