I am trying to make a button with a selector my button can have the following states:
According to
You can create a color list
file location:
res/color/filename.xml
The filename will be used as the resource ID.
resource reference:
In Java: R.color.filename
In XML: @[package:]color/filename
syntax:
Example:
XML file saved at res/color/button_text.xml
:
This layout XML will apply the color list to a View:
Refer: Color List Reference