Search code examples
androideventsgesture

How long is the event onLongPress in the Android?


Android supports an event onLongPress. The question I have is 'how long' (in milliseconds) is the 'press' to trigger the event?


Solution

  • The standard long press time is what is returned by getLongPressTimeout(), which is currently 500ms but may change (in 1.0 it was 1000ms but changed in a later release; maybe in the future it will be user-customizable).

    The browser uses its own long press time because it has some more complicated interactions. I believe this should be 1000, though again it may change in the future. It is not adding the different timeouts together.