Search code examples
androidimageanimationloopswave

Looping an image frame in android


I want to do an animation, a wave moving from right to left. I made a image of a wave where the start of it coincide with the end

enter image description here

I want to do an animation where the wave move, with an animationlist I would need more than 400 frames and the size of the application would grow up...

I need a way to move this only frame from right to left, any help?


Solution

  • You could create a Drawable of your own that implements Animatable, and have the image move from right to left. It would actually be quite an useful thing to have. However, you wouldn't be able to specify it from XML, you'd have to construct it and set it programatically.