Crete resources aliases
you can even use resources in XML to create aliases. For example, you can create adrawable resource that is an alias for another drawable resource:
This sounds redundant, but can be very useful when using alternative resource. Read more aboutCreating alias resources.
Referencing style attributes
A style attribute resource allows you to reference the valueof an attribute in the currently-applied theme. Referencing a style attribute allows you tocustomize the look of UI elements by styling them to match standard variations supplied by thecurrent theme, instead of supplying a hard-coded value. Referencing a style attributeessentially says, "use the style that is defined by this attribute, in the current theme."
To reference a style attribute, the name syntax is almost identical to the normal resourceformat, but instead of the at-symbol (@), use a question-mark (?), and theresource type portion is optional. For instance:
?[:][/]
For example, here's how you can reference an attribute to set the text color to match the"primary" text color of the system theme:
Here, the android:textColor attribute specifies the name of a style attributein the current theme. Android now uses the value applied to theandroid:textColorSecondarystyle attribute as the value for android:textColor in this widget. Because the systemresource tool knows that an attribute resource is expected in this context,you do not need to explicitly state the type (which would be?android:attr/textColorSecondary)—you can exclude theattr type.