I'm trying to drag overlays an a map and also display an infobox if the user taps on a pin. To do so I need to measure the time between MotionEvent.ACTION_DOWN
and MotionEvent.ACTION_UP
. To make it feel as natural as possible I would like to know what value Android uses for a Single-Tap (currently I'm using 180ms) and also for a Long-Tap.
Thanks!
Android source uses 125ms for a single tap and 500ms as the long press time:
private static final int PRESSED_STATE_DURATION = 125;
private static final int DEFAULT_LONG_PRESS_TIMEOUT = 500;
ViewConfiguration.java#PRESSED_STATE_DURATION
ViewConfiguration.java#DEFAULT_LONG_PRESS_TIMEOUT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With