Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Touch Event on entire screen

I have a disappearing header which I want to bring back into the view on a single tap anywhere on the screen. But if I am wrapping the entire <View> inside a <TouchableX> component the PanResponder stops working. Is there a hack around this?

like image 445
amit Avatar asked Aug 23 '16 10:08

amit


1 Answers

You do not need to warp it with Touchable component.

Add next props to root View.

onResponderGrant - make View handle touch

onStartShouldSetResponder - make View handle start

like image 166
Mr Br Avatar answered Sep 22 '22 04:09

Mr Br