mapbox / mapbox-gestures-android

The Mapbox Gestures for Android library makes it easy to detect and handle user gestures on an Android device.
https://docs.mapbox.com/android/maps/overview/gestures/
Other
28 stars 24 forks source link

Common repository for pointer data #76

Open LukasPaczos opened 5 years ago

LukasPaczos commented 5 years ago

Since there's only one entry point to pass MotionEvents, there's no difference between the data each gesture detector is working with.

We should centralize this incoming stream of events in one "repository" (AndroidGestureManager class?) that will server pointers map, distances, spans, and velocities for the gesture detectors. This should significantly decrease the memory and computation footprint of those computations which are effectively repeated by each gesture detector, because of the inheritance.