On Feb 11, 4:35 am, skink <psk...@gmail.com> wrote: > forgot to mention that built-in animations run with no delay - in > short they just call invalidate() in drawing phase in order to make > next frame of animation > > pskink
interesting - before reading this, i spent some time looking around for the exact mechanism and wasn't able to find it. i did override Animation and was able to get interpolatedTime back during the update process (which is really the only thing that matters - everything can be handled with just that number), but for reasons I still don't understand some of the visual effects are a little off. perhaps it has something to do with that? briefly, i'm zooming into a map (not a MapView - imagine a map of a building's interior). when this happens, lots of things besides a scale effect need to be updated - position of markers (which are not scaled, just repositioned), the layout dimensions of several layers need adjusted, scroll position is maintained or updated, etc. I've written a simple coordinate (lat/lng) to point (x/y) translater, and before the zoom animation goes i find the coordinate at the center of the screen, and after each "frame" I scrollTo the x/y of the equivalent point, so the center point stays consistent. when using a Timer/TimeTask, or Thread/Thread.sleep (or during pinch events, or with no animation at all), this works perfectly - but when i use an extended Animation with interpolatedTime, it tends to wander before finally settling on the correct position. it's confusing because it really looks like it should be the same thing - with the thread or timer versions, I just get back an interpolated time very similar to the output of the extended Animation, and pass that to a method that handles scaling, positioning, etc. unless there's an obvious answer why this happens, i suppose i'll move on to the timer-less straight Handler approach you mentioned initially (the timer/thread version uses a handler too, but in response run()). -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en