Android TranslateAnimation on button flickers

If you perform a TranslateAnimation on a button then only the drawing moves but not the real button, so you have to move the button yourself with an animationlistener.

Now you know what I already know and did and this works.

The problem lies in what the user sees. After the animation (so when I move the button) you see a short flickering in the screen. This is due to the drawing already being up, then I change the margin of the button so the drawing moves up even more, before it comes crashing down because of the fillAfter which is set to false

Any ideas on how to fix this? It may also be a whole other approach (without a translate-animation for example) but the effect needs to be the same (without the flicker ofcourse ;) )


There is piece of text of answer to my own question when faced the same problem

"After placing the view 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 gets 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 

for complete answer here is link

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

Need Your Help

pytesseract cannot find the file specified

python tesseract python-tesseract

My code is straight forward and is the following:

Windows 8, Fedora 19 OS Hyper-V Virtual Machine

windows-8 fedora hyper-v

I installed Fedora 19 in windows 8 hyper-v and its working fine but there is one small problem with the display setting, as fedora 19 display setting not providing 1366x768, but i need to set the d...