0
내 레이아웃에 버튼을 눌렀을 때 이미지를 변경해야하는 버튼이 있습니다. 나는 선택기 XML을 가진다. 여기상태를 눌렀을 때 Android 이미지 버튼의 색상이 변경되지 않습니다.
<ImageButton
android:id="@+id/cwcfwdvcs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:clickable="true"
android:layout_marginTop="16dp"
android:background="@drawable/button_add_to_favorites_unactive"
android:drawable="@drawable/add_to_favorites"
android:text="Favotites"/>
선택 add_to_favorites.xml됩니다 : 여기에 버튼이
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/button_add_to_favorites_active"
android:state_checked="true" />
<item android:drawable="@drawable/button_add_to_favorites_unactive" />