Open prokash-sarkar opened 7 years ago
can you explain how to use it please for example i want to show a toast when the animation ends. how do i do this? thank you.
Hi, in order to use the explosion finish listener you need to manually clone the repo and add the commit I pushed. After that use the following code,
ExplosionField explosionField = ExplosionField.attach2Window(MyActivity.this); explosionField.explode(myLayout); explosionField.listener(new ExplosionField.Listener() { @Override public void onExplosionFinish() { // perform action here } });
thanks i got it working but there is a little issue if i have several image and click on it at the same time it crashes
java.lang.NullPointerException at com........ContactFragment$1.onExplosionFinish(ContactFragment.java:28)
atcom.........Explosion.ExplosionField$3.onAnimationEnd(ExplosionField.java:107) atandroid.animation.ValueAnimator.endAnimation((ValueAnimator.java:1020)
Added a simple listener to trigger the event when the ExplosionField animation is finished.