CopyPastor

Detecting plagiarism made easy.

Score: 1.6610586047172546; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2021-07-17
by Codemaker

Original Post

Original - Posted on 2016-11-23
by Venkatesh Somu



            
Present in both answers; Present only in the new answer; Present only in the old answer;

By default there is no click or events that attached with any of the Views in react native like react.js. There are mainly two Views specifically designed for handling touch events. They are `TouchableOpacity` and `TouchableHighlight`. You can resolve your issue by wrapping your `Image` component with `TouchableOpacity` or `TouchableHighlight`.
<TouchableHighlight onPress={() => this.moveToAddNewCustomer()}> <Image style={styles.imagestyle} source={require('./ic_action_name.png')} /> </TouchableHighlight>
https://reactnative.dev/docs/touchablehighlight
https://reactnative.dev/docs/touchableopacity
You need to do it like this:
<TouchableHighlight onPress={() => this.moveToAddNewCustomer()}> <Image style={styles.imagestyle} source={require('./ic_action_name.png')} /> </TouchableHighlight>
or
<TouchableOpacity onPress={()=>this.moveToAddNewCustomer()}> <Image style={styles.imagestyle} source={require('./ic_action_name.png')} /> </TouchableOpacity>

        
Present in both answers; Present only in the new answer; Present only in the old answer;