Easy like itself . I wanna make an alpha button , which would have a selected drawable this way:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Play/Pause -->
<item android:state_selected="false" android:drawable="@drawable/item" />
<item android:state_selected="true" android:drawable="@drawable/item" />
</selector>
I would wanna make something like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Play/Pause -->
<item android:alpha="125" android:state_selected="false" android:drawable="@drawable/item" />
<item android:alpha="255" android:state_selected="true" android:drawable="@drawable/item" />
</selector>
Thanks for all .
XxxView
byAppCompatXxxView
in your layout XML and follow @kikettas´ advice: https://mcmap.net/q/1470902/-is-there-a-way-to-set-drawable-39-s-alpha-using-xml – Inge