Issue
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!
Solution
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
Answered By - Andy McSherry
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.