react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

can't use onPress with swiper

Open Evacaca opened this issue 7 years ago • 5 comments

Evacaca avatar Apr 20 '17 15:04 Evacaca

@Evacaca this solves the problem:

https://github.com/leecade/react-native-swiper/issues/201

Please close the thread if that works for you :)

harrisrobin avatar May 01 '17 00:05 harrisrobin

@harrisrobin @Evacaca worked for me:

 <View style={styles.slide2}>
          <TouchableWithoutFeedback onPress={() => console.log("onPress")}>
            <Image
              resizeMode="stretch"
              style={styles.image}
              source={require("../images/test2.jpg")}
            />
          </TouchableWithoutFeedback>
        </View>

SKempin avatar Mar 03 '18 21:03 SKempin

ios can't onPress

hengkx avatar Jul 07 '20 01:07 hengkx

Does not work on iOS

<TouchableWithoutFeedback 
                onPressIn={() => console.log('in')} 
                onPressOut={() => console.log('out')} 
                onPress={() => {
          console.log("clicked");
          setVisible(!visible);
        }}>

            <Swiper
              onIndexChanged={swiperIndexChange}
              key={images ? images.length : 0}
              width={width}
              height={height}
              showsPagination={false}
              loop={false}>
              {images.map((url, index) => {
                return (
                  <View key={index}>
                    <ImageItem imageUrl={url} />
                  </View>
                );
              })}
            </Swiper>
        </TouchableWithoutFeedback>

dovahkrid avatar Aug 21 '20 09:08 dovahkrid

if Swiper children data has been changed it renders back to index 0 element

VentroArt avatar Feb 11 '22 20:02 VentroArt