In my android app I have a view which is laid on top of another view. When I click a button this top view is animated and goes out of screen. The problem is that it is like the view is still “there” as it captures all touch events and they do not get passed to the view which is behind.
This is the code that animates the view away:
TranslateAnimation animation = new TranslateAnimation (0, 0, 0, height);
animation.setDuration(1000);
animation.setFillAfter(true);
topView.startAnimation(animation);
What can I do to solve this problem?
Create an animation Listener and remove the view from its parent when the animation is over.