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. paging om arya mada & WTB htc desire cdma new

Kontak cak Nurfat
Kemarin masih ada stok desire cdma sepertinya


Bayu Seno Adji
Android 4"


2. Supporting xlarge screens in sdk 8

I'm trying to allow support for xlarge screens using the compatibility 
The app is at min level 8 with a target of 11 (as per the Optimizing app for 
android 3 article).

However when I try to add the supports-screens and include the 
android:xlargeScreens i get an error because level 8 doesn't know about the 

e.g. this is an error:






        android:anyDensity="true" />

Does anyone know how I deal with this situation? I'm specifically using the 
compatibility library so my level 8 users don't get left out, but I want to 
make sure we can develop forward to honeycomb.


- Brill Pappin


3. Rounding Numbers

4. In-app billing as a method of activating a trial feature?

5. is there any idea that files are only used by application those are stored on media card?

6. The "Blinking Activity of Death"

7. java.lang.ArrayIndexOutOfBoundsException: too much data for RSA block