Animationdrawable Error On Button Click
I believe my xml is correct, but I'm not sure what's causing this error in my code. I am trying to attempt animationdrawable on an imagebutton, but each time I click my button I ge
Solution 1:
2 things:
- Change your drawable (remove
selectortag):
<animation-listxmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/selected"android:oneshot="true"><itemandroid:drawable="@drawable/musicon1"android:duration="50" /><itemandroid:drawable="@drawable/musicon2"android:duration="50" /><itemandroid:drawable="@drawable/musicon3"android:duration="50" /><itemandroid:drawable="@drawable/musicon4"android:duration="50" /><itemandroid:drawable="@drawable/musicon5"android:duration="50" /></animation-list>- I can't see you setting the background of the
musicEnable_ImageButton, you're only trying togetit... Am I missing something, or are you just forgetting to set the background in the first place?
Post a Comment for "Animationdrawable Error On Button Click"