androidandroid-animationandroid-event

How to Stop Event's While Animation is in process?


I am working on Animating my view where i animate the translation and scaling of View.

Problem:

If my animation duration is for 2000 ms (2 Sec) i don't want any user event's to interfere in between animation.

Example if Double Tap on View Trigger's the Scaling Animation and scrolling trigger's Translation Animation.Both animation duration is 2 seconds,But if i double tap and scroll one after another it create's weird result.

So i want to stop event's when animation is going on.

Is there any easy solution without maintaining the state of OnGoing animation and overriding the onTouchEvent to disable events?


Solution

  • Solution that i used: