I’ve created a custom buttom with a selector:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/button_np"
android:state_enabled="false"/>
<item android:drawable="@drawable/button_np_pressed"
android:state_pressed="true"/>
<item android:drawable="@drawable/button_np"
android:state_focused="true"/>
<item android:drawable="@drawable/button_np"/>
</selector>
I would like to be able to colorize this button by using a gray button as image and then colorize it with a color I’ve defined.
Is that possible?
Thanks
It sure is possible (at least in code), you set a color filter.
Just choose your colors and put them in the setColorFilter parameters.