react-native-image-gallery
react-native-image-gallery copied to clipboard
Better support for tap and longPress
Currently it's hard to use tap and long press events on the images.
I want to use in the same time:
- tap (fast press) to show/hide photo infos
- long press to select the photo
Long press delay is hardcoded to 600ms here: https://github.com/archriss/react-native-image-gallery/blob/master/src/Gallery.js#L133
onSingleTapConfirmed is more suited to ensure that it is a singleTap (vs a double tap) but is slow to fire and has a 500ms delay: https://github.com/ldn0x7dc/react-native-gesture-responder/blob/master/library/createResponder.js#L220
It would be nice to make these 2 delays configurable so that it's easy to detect a single press / long press. The most annoying is to have the delay on single press. Could we have something like onPress, similar to the longpress code, but with a much shorter default delay (like 150) and make both delays configurable?
I second that. In our application, we need single tap detection without delay. And we don't need the double tap zoom, since users can use pinch to zoom.
It would be wonderful if an option can be provided to disable double tap zoom so that the single tap detection can be done without delay.
Yeah I really need this too. onSingleTapConfirmed is unusable for my purpose right now. Have either of you modified the code yourselves?
+1