I have two imagebuttons in a LinearLayout with the following:
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgImport"
android:layout_margin="6dp"
android:clickable="true"
android:background="@drawable/bgselector2"
android:src="@drawable/player_import" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgEdit"
android:layout_margin="6dp"
android:clickable="true"
android:src="@drawable/players"
android:background="@drawable/bgselector" />
The selector on the second imagebutton works properly but the first image button with the following simple selector does not! Why is that?
<?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/players_import_pr" />
<item android:state_enabled="true" android:drawable="@android:color/transparent" />
</selector>