1

I want to have a loading icon that spins in a circle. My icon is a drawableLeft

I currently have it setup as an AnimationDrawable:

AnimationDrawable ad = (AnimationDrawable)run.getCompoundDrawables()[0];
ad.start();

Which is basically cycling through 4 different version of the bitmap:

<item android:drawable="@drawable/ic_load" android:duration="400" />
<item android:drawable="@drawable/ic_load2" android:duration="400" />
<item android:drawable="@drawable/ic_load" android:duration="400" />
<item android:drawable="@drawable/ic_load2" android:duration="400" />

However, it is not a smooth animation. How can I make it rotate rather than cycle though different bitmaps?

Thanks

Chirag Savsani
  • 6,020
  • 4
  • 38
  • 74
teiiluj
  • 241
  • 3
  • 10

0 Answers0