Here is just a quick reference on what is involved when you want to use different colours based on the selected theme in an Android app:
- In attrs.xml, define an attribute that references an item in a theme. Add a line, i.e.
name="calculator_button_background" format="reference" />
- In themes.xml, add the item
- The colour can be a direct @color or, in this case, can use predefined colour in colors.xml