EditText stucks after animation and alive back on scrolling……?

The problem here was when applying slider.setFillAfter(true); the code animates the image of Views but not the actual Views that’s why when I see them after sliding down animation they were (EditText and save button) stuck or you can say dead and not listening to their events because actual Views were there behind the layout and at front it was just their image

The solution I found for that problem is to apply following code:

slider.setFillAfter(false);
slider.setFillBefore(false);
// OR you can directly write
slider.setFillEnabled(false);

And then to show actual views on the new place by setting animation listener and using the following method:

public void onAnimationEnd(Animation a)

Placing the views to new position at the end of animation by using above method. And here still comes another problem of blinking which is due to the problem in android animation listener method which is that it is get called before actually animation ends and causes blinking effect, a tricky solution to it is by putting following line of code at first line of public void onAnimationEnd(Animation a) method.

// in my case animation applied to notes_editor so the code will be 
notes_editor.clearAnimation();

Leave a Comment