I want to create effects for ImageButton. For example, it will change color when clicked...How I do it? I want to do this in .xml file. Can you help me! Thank you! I tried to create the state.xml file as follwing:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_0" />
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_ac" />
</selector>
However, I can't set background for ImageButton. The error like this: