ozodrukh / CircularReveal

Lollipop ViewAnimationUtils.createCircularReveal for everyone 4.0+
MIT License
2.43k stars 391 forks source link

Programmatically cancel current animation #30

Closed aashreys closed 9 years ago

aashreys commented 9 years ago

Is there any way to programmatically cancel a running circular reveal animation? Perhaps something like

if (animation.isRunning()) { animation.cancel(); }

ozodrukh commented 9 years ago

Ok, it is not implemented by API but you can do something like that

  SupportAnimator animator = ...
  if(animator.isRunning()){
     com.nineoldandroid.Animator cna = animator.get();
     cna.cancel();
  }
aashreys commented 9 years ago

Sure, thanks! I'll try this for now. Could you add a method to make it easier to access later on?

ozodrukh commented 9 years ago

it will be better and faster if you would add pull request

ozodrukh commented 9 years ago

checkout last version