-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I am trying to use "TouchableOpacity" in my Grid View and wrote my code like bellow
showPlayer(item) {
Alert.alert("Sample", "showPlayer");
}
renderItem(item) {
return <TouchableOpacity style={{alignItems:"center"}} onPress={this.showPlayer.bind(this, item)}>
<ImageLoad
placeholderSource = {require('../images/PlaceHolder.png')}
style={styles.thumbnail}
isShowActivity = {false}
source={{uri: thumbnailObj.value}}
/>
<Text style={styles.gridText}> {item.name}</Text>
</TouchableOpacity>
}
For the above code I am getting error as "undefined is not an object (evaluating 'this.showPlayer.bind')"
Metadata
Metadata
Assignees
Labels
No labels