Setting text as "main" on Android

When viewing Android built-in themes / styles, I noticed links to textColorPrimary, textColorSecondary, etc. I would like to implement this in my own topic, but I can not find a way to configure textview (or any view) to "primary" or "secondary", etc.

Am I missing something or is it impossible to do?

+4
source share
1 answer

The links you see on "textColor_____" are links to the color selector. Do you use them with a string like "android: textColor ="? Android: textColorSecondary "in the XML definition of your TextView.

See this for more details: http://developer.android.com/guide/topics/resources/accessing-resources.html#ReferencesToThemeAttributes

+14
source

Source: https://habr.com/ru/post/1338107/


All Articles