I hope to change the color of QS after clicking on the shortcut on the basis of google native. I found that the final view change is in the QSTileViewImpl.kt class.I found that the color turned on after clicking QS ends up using this colorActive. When I try to modify the color here directly, it will fail. I want to ask the solution boss for help. Why?
private val colorActive = Utils.getColorAttrDefaultColor(context,
com.android.internal.R.attr.colorAccentPrimary)
private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor)
private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
private val colorLabelActive =
Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.textColorOnAccent)
private val colorLabelInactive =
Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary)
private val colorLabelUnavailable =
Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.textColorTertiary)
private val colorSecondaryLabelActive =
Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondaryInverse)
private val colorSecondaryLabelInactive =
Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary)
private val colorSecondaryLabelUnavailable =
Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.textColorTertiary)
I tried to modify the above color value, but the effect is not good, it is not the same as the effect of other people’s mobile phone click, I do not know what other ideas are, please answer, thank you very much!
xiaowei魏 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.