滚动时触发TouchableOpacity

时间:2018-04-04 18:57:32

标签: android reactjs react-native

我正在使用FlatList for Scroll,当我使用触摸屏拖动屏幕时,onPress会触发一个问题。是否有任何方法在拖动屏幕时不会触发onPress?

        cosnt renderItem=<TouchableOpacity onPress={this._onPress}>
            <View>
              <Text style={{ color: textColor }}>
               Test 
              </Text>
            </View>
         </TouchableOpacity>

         <FlatList
                data={props.places}
                renderItem={renderItem}
                keyExtractor={extractItemKey}
                onRefresh={props.getPlacesList}
                onEndReachedThreshold={0.5}
                onEndReached={getMorePlaces}
            />

0 个答案:

没有答案
相关问题