View#hitSlop

hitSlop {top: number, left: number, bottom: number, right: number}

This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.

doc_React_Native
2016-06-23 04:26:03
Comments
Leave a Comment

Please login to continue.