Touching an object in a tweened animation?

by Michael » Fri, 23 Apr 2010 02:59:30 GMT

Sponsored Links
 I'm having trouble porting a simple game I developed for the iPhone
over to Android. The game has an animated ball which moves from Point
A to Point B. The user must touch the ball before it reaches point B
or lose the game. This was easy to implement on the iPhone using Core
Animation since I could locate the current position of the ball by
accessing its animation layer. In Android, I attempted to recreate the
game using tweened animation and represented the ball as a Drawable.
My issue is that I can't determine if the user is touching the spot
because the Drawable apparently bounds do not update as the ball
visually moves - making the program think the ball is always in its
original position. While searching these forums I saw an Android team
dev. confirm that you can't get the current location in a tweened
animation but offered no solution for a workaround. Can I accomplish
this on the Android using my current approach? If not, what approach
should I use?

Best regards,


Other Threads

1. Battery Driver Misreporting Current Draw?

I wasn't sure if this post would belong more to the kernel group.
Anyway, I'm working on an application which keeps track of some
battery information (mostly the current draw).  To do this, I'm
periodically reading the sys file located at /sys/class/power_supply/
battery/batt_current.  I've noticed that while my G1 phone is plugged
in via USB, the file reports a current of something like ~450 mA which
sounds okay since the battery is charging.  However, when I unplug the
phone, the battery current is reported as a constant 5 mA.  I would
have expected a negative number since the battery is discharging, or
at least a larger number.

Has anyone else noticed similar behavior?



2. Fixed application mainline size?


Is application main window size fixed? Is there a way to make main
application window smaller?



3. Serial port data over RFCOMM

4. How to add scrollbar?

5. Sync with OSX

6. widget section in market

7. Question when start emulator from command line in Linux Ubuntu