How to create a draggable overlayItem in Android 2.1
Posted
by Zap
on Stack Overflow
See other posts from Stack Overflow
or by Zap
Published on 2010-03-28T01:22:17Z
Indexed on
2010/03/28
1:23 UTC
Read the original article
Hit count: 406
Does anyone know how to make a map overlayitem draggable so I can press and hold it and drag it across the map. I am trying to duplicate the draggable icon behavior that's available on the iPhone.
One developer suggested a possible solution is to detect a touch event, get rid of the existing overlay item, draw your own copy of the icon where the overlay item had been, manually animate that as the user drags, and then put the overlay item where the user drops it (getting rid of your manually-drawn icon).
Does anyone have sample java code to do this Android 2.1? This would be much appreciated.
© Stack Overflow or respective owner