react-native-slideshow
react-native-slideshow copied to clipboard
Add on press example
Can you help me, where I can place this code onPress to move to other screen detail image? Thanks
try this add TouchableHighlight in Slideshow.js
const imageComponent = ( <View key={index}> <TouchableHighlight onPress={()=>console.log('I : '+this.state.position)}> <Image source={imageObject} style={{height, width}}/> </TouchableHighlight> {textComponent} </View> ); const imageComponentWithOverlay = ( <View key={index} style={styles.containerImage}> <View style={styles.overlay}> <TouchableHighlight onPress={()=>console.log('I : '+this.state.position)}> <Image source={imageObject} style={{height, width}}/> </TouchableHighlight> </View> {textComponent} </View> );