how do i trigger onNext clicking on custom touchableHighlight?
See original GitHub issueHi, here is my code:
_renderItem = (props) => {
return (
<View style={styles.container}>
<Image source={images.background} style={styles.backgroundImage} >
<View style={styles.titleView}>
<Image source={images.menu_logo}/>
<Text style={styles.title}>{props.title}</Text>
</View>
<View style={styles.bodyView}>
<Image source={props.image} resizeMode={'contain'} style={styles.image} />
<Text style={styles.bodyText}>{props.text}</Text>
</View>
<TouchableHighlight
onPress={this.nextPressed.bind(this)}
style={styles.okButton}
>
<Text style={styles.okButtonText}>OK</Text>
</TouchableHighlight>
</Image>
</View>
);
}
_nextPressed = () => {
..........?????
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
React-Native TouchableHighlight activates wrong button ...
I have a React-Native view where I have to buttons side by side from each other. What is happening is when I click...
Read more >TouchableHighlight - React Native
A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, which allows the ......
Read more >React Native - Quick Guide - Tutorialspoint
Step 5: Start react native ... Then, select Marshmallow and click on next. ... click on the play button under the Actions column...
Read more >How to get a `onPress` callback with data in `TouchableOpacity`
How to avoid having to click TouchableOpacity twice to trigger onPress event? ... how to get sender in TouchableHighlight's onPress ...
Read more >Awesome Router Component for React Native - Morioh
Now, when you click on "Next page please! ... The action gets triggered from your custom leftCorner or rightCorner components by calling this.props....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Normally you wouldn’t define your own button like that but instead use the
renderNextButton
andrenderDoneButton
-props. If you really want to do it that way, though I don’t recommend it, you can callgoToSlide
like this:Just note that
onDone
won’t be called when you specify your own button component.after I implement
<AppIntroSlider ref={ref => this.AppIntroSlider = ref} />
and do call
this.AppIntroSlider.goToSlide(1);
I’m getting the following error: TypeError: undefined is not an object (evaluating ‘_this3.AppIntroSlider.goToSlide’)