Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explosion animation of a View in android [closed]

I'd like to animate a View (for example a Button, ImageView) that it would appear to be exploding, as with by a bomb. What would be the best approach to implement this? Overlay an explosion frame-based animated sprite over the view? Or is there a possibility to implement this in code somehow?

like image 279
Axarydax Avatar asked Mar 07 '12 06:03

Axarydax


People also ask

What are the two different types of view animations in Android?

There are two types of animations that you can do with the view animation framework: Tween animation: Creates an animation by performing a series of transformations on a single image with an Animation. Frame animation: or creates an animation by showing a sequence of images in order with an AnimationDrawable .


1 Answers

You can use the 'ExplosionField' library, it makes it very straightforward. Good luck!

Gradle:

dependencies {
   compile 'tyrantgit:explosionfield:1.0.1'
 }

Usage:

ExplosionField explosionField = ...;
explosionField.explode(view);
like image 75
Alécio Carvalho Avatar answered Oct 21 '22 17:10

Alécio Carvalho