diff --git a/packages/SystemUI/res/layout/people_strip.xml b/packages/SystemUI/res/layout/people_strip.xml index 7dcc46c3ca091..ec004296ff9da 100644 --- a/packages/SystemUI/res/layout/people_strip.xml +++ b/packages/SystemUI/res/layout/people_strip.xml @@ -43,6 +43,7 @@ android:forceHasOverlappingRendering="false"> > private set override fun onFinishInflate() { contents = requireViewById(R.id.people_list) + label = requireViewById(R.id.header_label) personViewAdapters = (0 until contents.childCount) .asSequence() // so we can map .mapNotNull { idx -> @@ -49,6 +53,8 @@ class PeopleHubView(context: Context, attrs: AttributeSet) : setVisible(true /* nowVisible */, false /* animate */) } + fun setTextColor(@ColorInt color: Int) = label.setTextColor(color) + override fun findContentView(): View = contents override fun findSecondaryView(): View? = null diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java index a3d8eecdfd68b..5777ba120ef02 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java @@ -16,9 +16,11 @@ package com.android.systemui.statusbar.notification.stack; +import android.annotation.ColorInt; import android.annotation.Nullable; import android.annotation.StringRes; import android.content.Context; +import android.content.res.ColorStateList; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; @@ -124,4 +126,9 @@ public class SectionHeaderView extends StackScrollerDecorView { mLabelTextId = resId; mLabelView.setText(resId); } + + void setForegroundColor(@ColorInt int color) { + mLabelView.setTextColor(color); + mClearAllButton.setImageTintList(ColorStateList.valueOf(color)); + } }