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. Module version conflicts between wlan module and Android kernel source

The android-porting list might be a better place to ask this, as they
deal with lower-level hardware.

j






-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~

2. Module version conflicts between wlan module and Android kernel source

Hi,

  I'm tinkering with building and installing Android from source.
Basically I've got it down fairly well, but I seem to have run into a
bit of a problem with the wlan module, probably from HTC.

  Having pulled the 2.6.27 kernel sources and built that with
a .config pulled from the phone, and using that as the kernel image
instead of the prebuilt one, I get the following wifi failure message
in dmesg:

wlan: version magic '2.6.27-00205-gf2dabc0 preempt mod_unload ARMv6 '
should be '2.6.27-00392-g8312baf preempt mod_unload ARMv6 '

probably because the .config I pulled from the phone has:

CONFIG_LOCALVERSION="-00392-g8312baf"

So I rebuilt with the '00205' localversion and now I get in dmesg:

[   61.122497] wlan: Unknown symbol trout_pwrsink_set

but trout_pwrsink_set was changed to htc_pwrsave_set way back in
February:

[ARM]: trout: Switch from trout_pwrsink -> htc_pwrsink  33/8933/1
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=44a01f54989b1c8669a8075189886a1bdf29bc17

  I'm clearly getting an obsolete wlan module somehow, Any ideas for
how I can get a wlan module that goes with the '00392' kernel would be
appreciated.

--~--~---------~--~----~------------~-------~--~----~

3. Null reference to ImageView from custom view

4. Market countries - how are they determined ?

5. ( problem for experts ) update/refresh list problem

6. trouble with using keyboard-input to move things on screen, using requestFocus, OnKeyListener etc unsuccessfully.

7. trouble with using keyboard-input to move things on screen, using requestFocus, OnKeyListener etc unsuccessfully.