0

I'd like to display an animated drawable in my app.

Just to make the reader visualize what I have in mind, I need an air-conditioning unit that emits flows of air; the "power" of the flows should be adjustable.

It would be something like the animation of the Earth one can find in this app. Link to the animation.

I've found the AnimationDrawableclass here but this is a frame-by-frame animation, so I'd have to create lots of images.

I was woldering what would be the best way to create such an animation.

I apologize for the lack of specificity of this question but I don't know what to look for.

Michele
  • 326
  • 8
  • 18

3 Answers3

0

I recommend you to use your drawable as a background (as i think it is used in the animation with the earth) and for your animation to use canvas. Here is an example from a game that uses the same principle. You can use either the animation with the birds moving, either the one with the bullets. To increase the intensity,increase the speed.

0

you can use a lottie animation. It's uses a json format of the animation.

check this library : airbnb/lottie-android

Kasun Thilina
  • 1,523
  • 2
  • 14
  • 20
0

I ended up using a RotateAnimation because it was the easiest option to achieve what I wanted.

To make the rotation smooth I followed what was suggested in this StackOverflow answer.

Michele
  • 326
  • 8
  • 18