Hello,
I try add animation for button, I try use own, xml file
saved as catanim.xml
and use as setBackgroundResource(R.drawable.catanim);
That doesn't work
I try also code like here
And animation for button still doean't work on Emulator and Device (both with Android 2.1 / API 7)
Please help
I try add animation for button, I try use own, xml file
<animation-list androidneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/cat" android:duration="200" />
<item android:drawable="@drawable/catakt" android:duration="200" />
<item android:drawable="@drawable/cat" android:duration="200" />
<item android:drawable="@drawable/catakt" android:duration="200" />
<item android:drawable="@drawable/cat" android:duration="200" />
<item android:drawable="@drawable/catakt" android:duration="200" />
<item android:drawable="@drawable/cat" android:duration="200" />
<item android:drawable="@drawable/catakt" android:duration="200" />
<item android:drawable="@drawable/cat" android:duration="200" />
<item android:drawable="@drawable/catakt" android:duration="200" />
</animation-list>
saved as catanim.xml
and use as setBackgroundResource(R.drawable.catanim);
That doesn't work
I try also code like here
animation = new AnimationDrawable();
animation.addFrame(getResources().getDrawable(R.drawable.cat), 3000);
animation.addFrame(getResources().getDrawable(R.drawable.catakt), 3000);
animation.addFrame(getResources().getDrawable(R.drawable.cat), 3000);
animation.addFrame(getResources().getDrawable(R.drawable.catakt), 3000);
animation.addFrame(getResources().getDrawable(R.drawable.cat), 3000);
animation.addFrame(getResources().getDrawable(R.drawable.catakt), 3000);
animation.setOneShot(false);
animal1Button.setBackgroundDrawable(animation);
animation.setVisible(true, true);
animation.start();
And animation for button still doean't work on Emulator and Device (both with Android 2.1 / API 7)
Please help
neshot="false" xmlns:android="http://schemas.android.com/apk/res/android">