I have created a TouchableOpacity
which has an icon. The onPress
method calls Image Picker.
<View style={styles.container}>
<TouchableOpacity style={styles.buttonStyle} onPress={pickImage}>
<MaterialIcons name="add-to-photos" size={24} color="black" />
</TouchableOpacity>
<TouchableOpacity style={styles.buttonStyle}>
<MaterialIcons name="add-to-photos" size={24} color="black" />
</TouchableOpacity>
</View>
Once the image is picked I am using useState
to set the URI value to a variable Image1. Now I am want to display the Selected Image in the TouchableOpacity
once the Image is picked.
How can I show selected image and not the icon once the image is picked.