I am looking at the Honeycomb Gallery sample code (here) and I ran across the following code while trying to add action items in my own app:
-
This blog post does an amazing job going over how to reference values for style-attributes that are defined in the current theme: https://trickyandroid.com/android-resources-and-style-attributes-cheatsheet/
When you see ?
notation - it means that we are trying to reference a style attribute - a value
which may vary depending on current theme. In each specific theme we can override this attribute, so
the XML layout doesn't need to be changed, and the correct theme needs to be applied.
When you see the @
notation - we reference actual resource value (color, string, dimension,
etc). This resource should have an actual value. In this case we know exactly what value we are
dealing with.
Here's an example: