I read this example and I’m trying to use it. I put this in drawable folder as somth.xml:
<animation-list android:id="selected" android:oneshot="false">
<item android:drawable="@drawable/img1" android:duration="50" />
<item android:drawable="@drawable/img2" android:duration="50" />
</animation-list>
I also put it in anim folder I try to add header like:
<?xml version="1.0" encoding="utf-8"?>
But give me an error like this:
Error in an XML file: aborting build.
What is wrong?
Strange, it seems that
android:idis not a valid attribute for frame animations.Try removing that attribute and/or adding
xmlns:android="http://schemas.android.com/apk/res/android"to<animation-list>.