Make TouchableOpacity not highlight element when starting to scroll [React Native]

后端 未结 2 602
走了就别回头了
走了就别回头了 2021-01-01 19:08

TouchableOpacity makes things touchable, or as React Native says:

A wrapper for making views respond properly to touches.

2条回答
  •  醉话见心
    2021-01-01 19:16

    You can use delayPressIn={1000}, which will delay the animation until you press for 1 second.

    delayPressIn property of delay in ms, from the start of the touch, before onPressIn is called.

    Example to use :

     result.data.id}
      renderItem={({ item }) => {
        return (
           navigation.navigate('ResultsShow')}
          >
            
          
        );
      }}
    />;
    

    You can find more about this Here.

提交回复
热议问题