I read a lot about Animation pre Honeycomp, and that changes only take account inside drawing. I have to support versions down to 2.1, so Animator isn’t an Option, too.
I have a LinearLayout, containing two Buttons laying on the right side of the screen. On some Events I Animate the right Button out of the View. Unfortunately the Click-ecents are registered on their original positions. As a workaround, I added an AnimationListener, and set the Buttons visibility to View.GONE on AnimationEnd, and bring it back with View.VISIBLE if the Button is animated In again. This leads to an ugly flash of the Layout which is animated if I apply the Visibility.
Is there another way to keep track of the Views after the Animation? Can I remove a View, without resulting in a flash inside the containing Layout (maybe some sort of doubleBuffering)?
EDIT:
the term Flash means that the view dissaperas on its Position for a very short period and appears after it again on the same Position. It happens exactly if onAnimation[Start|End] changes something inside that Layout
by “flash” , do you mean that the views jump to their new location? or do you mean that during the transition between the animation end , there is something that looks like a bug that moves the view for a split of a second to its original position?
in any case , here’s a sample code that worked for me on a similar scenario . you will of course need to change it. i hope it could help you: