Not sure if there is a built-in way to do this. But it's pretty simple to load bitmaps into an array.
Then call invalidate (), your onDraw () method itself must invalidate () and in the next run calculate what frame to display (by calculating the display time of the last frame). Each time you play a frame, you increase the frame counter and reset the time counter.
You can use a variable delay, and it's pretty easy to implement.
source share