I am trying to display an animated graphic identical to the indeterminate progress bar (not the horizontal one, but the circular one) in the status bar while my on-going notification is alive.
I tried to find the resource ID corresponding to the indeterminate progress bar, but found that it is animated via code.
I tried setting the icon ID in my Notification instance to an animated GIF, but only the first frame of the GIF is displayed in the Status bar.
If I set the icon ID to android.R.drawable.progress_indeterminate_horizontal, the graphic animates perfectly. So, my question is- how is the animation achieved in this case? Through iconLevel? How can I set an animated icon without requiring to animate it periodically myself?
I found my answer. The requirement is to create an animation list (say saved as my_spinner.xml), with various images of the spinner rotated by different angles from 0 to 360.
And set my_spinner.xml as the icon ID when the notification is created.