How to create a draggable overlayItem in Android 2.1
- by Zap
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.