I want to create a progress bar which should show moving images effect. for that I have created an animation list and have saved in my drawables folder in res. Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/p_one" android:duration="150" />
<item android:drawable="@drawable/p_two" android:duration="150" />
<item android:drawable="@drawable/p_three" android:duration="150" />
<item android:drawable="@drawable/p_threesix" android:duration="150" />
</animation-list>
After that I have used this drawable like this: for my ProressBar Drawable
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:indeterminateOnly="true"
android:indeterminateDrawable="@drawable/progress_bar_anim"
android:visibility="visible" />
Problem: Nothing is displaying when I run this code. Why ? When I use any single image instead of the animation-list drawable, then it is displayed correctly. Is there any other to do this ?