Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ?android:colorControlHighlight and ?colorControlHighlight

I see both ?android:colorControlHighlight and ?colorControlHighlight in our code base, and they seem to behave the same.

According to References to theme attributes doc, the android part is optional. Are these indeed the same? If not, which one should be used where?

like image 936
BenMQ Avatar asked Nov 16 '25 04:11

BenMQ


1 Answers

Attributes starting from android: are system resources.

Attribute colorControlHighlight belongs to Material theme and is available in system resources starting from API 21.

So ?android:colorControlHighlight will not work in older versions.

?colorControlHighlight - uses value specified in project resources. More precisely - in AppCompatTheme. We can use it without additional prefix because AppCompat lib is linked to your project and all its attributes are included to the project.

like image 151
DmitryArc Avatar answered Nov 18 '25 17:11

DmitryArc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!