Getting rid of the blink after a TranslateAnimation

by Mark » Fri, 11 Feb 2011 11:40:58 GMT


Sponsored Links
 I'm using TranslateAnimation  to actually move a View from one place
to another, however from what I can google no one has managed to
actually do this without having the View blink out for a second at the
end of the animation...  If you've managed to do this without the
blink please share.

Has anyone tried doing the translate themselves with AbsoluteLayout?
It looks like I'll have to duplicate the translate functionality by
using a Handler to act as a run loop and move the View myself? A
handler isn't a separate thread right? I just use it to to call a move
function every X ms?

-- 



Re: Getting rid of the blink after a TranslateAnimation

by Hari Edo » Fri, 11 Feb 2011 22:50:18 GMT


 Note that the usual matrix-manipulating animations don't change the
hit-testing for a view, so you have to actually move the real view
if you plan on animating a view that is touchable.

My app, "Qwiz - Hiragana", uses a LOT of drag and drop of views,
and touchable views that move around on their own initiative.

I implemented a true Animation class that adjusts the view's
position instead of manipulating the drawing transform matrix.
Then you don't need to reinvent the wheel of timing and iterating
and interpolating things (and you can use all of the other fun
iterators to bounce or wiggle the view).  I use a FrameLayout to
support moving things around by their margin coordinates, instead
of an AbsoluteLayout, but the idea is the same.




-- 


Sponsored Links


Other Threads

1. Howto create a quick action bar/badge/Dialog

Hey everyone,

I watched the UI session on Google IO this year in which they showed
us the quick action dialogs used in the twitter App.
I really like the way they work and would like to include one in my
own App.
But even though I'm not a beginner I can't think of an efficient way
of implementing the dialog / badge / bar.

I tried looking at the implementation of the quick contact bage but it
is rather complex and hard to extract the essentials. And in the end
it's not really the same as the twitter one.

Does anyone have an example or is there any documentation of how to
create quick action bars?

Greets David

-- 

2. @green Saiful Hidayat's locat...@3:55pm,6/26

Saiful Hidayat's locat...@3:55pm,6/26
Jalan Diponegoro, Bandung Regency, Bandung Regency
http://m.google.com/u/m/zMtZyw

froyo on Google One

-- 
"Indonesian Android Community [id-android]" 

3. Save image on SD card

4. Sensor listeners - threads and responsiveness

5. Try the free AndroidShell app to speed you learning of Android programming

6. OOT: salut buat suhompongg....

7. Galaxy Spica VS HTC Legen