opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

Native Android MotionEvent is private in AndroidMotionEvent #141

Open AAverin opened 9 years ago

AAverin commented 9 years ago

It would be good to be able to access native Android MotionEvent somehow. Android already provides a great gesture detection mechanism via GestureDetector class, but it needs native MotionEvent to work.

AAverin commented 9 years ago

Another thing that current implementation is lacking is ability to copy motion events. It's difficult to make a custom GestureDetector implementation if you can't make a copy of AndroidMotionEvent. It's either need to be Cloneable, or have a construction ability with copying. Native Android MotionEvent implementation has that.

AAverin commented 9 years ago

Ok, I've spent half a day and tried every workaround I could think of, like doing a custom map, doing a custom GestureHandler, checking events via custom EventsLayer that implements GestureListener, and there is no way I can have proper gesture detection that will allow me to make a different behavior depending on gestures. I need some stuff to be done in the end of all events except single click.