Setting text as "primary" in Android
While looking through the built in Android themes/st开发者_运维问答yles I noticed references to textColorPrimary, textColorSecondary etc. I would like to implement this in to my own theme but cannot find any way of setting a textview (or any view) to "primary" or "secondary" etc.
Am I overlooking something or is it not possible to be done?
The references you're seeing to "textColor_____" are references to color selectors. You use them with a line like 'android:textColor="?android:textColorSecondary"' in the xml definition of your TextView.
See this for more detail: http://developer.android.com/guide/topics/resources/accessing-resources.html#ReferencesToThemeAttributes
精彩评论