I want to do a password box that:
My codes are something like following:
<View style={styles.container}>
<TextInput
style={styles.textInput}
value={text}
onChangeText={text => this.setState({ text })}
secureTextEntry={secureTextEntry}
underlineColorAndroid="transparent"
/>
<TouchableWithoutFeedback
onPress={() => (showing ? this.hide() : this.show())}
>
<Image source={this.image} />
</TouchableWithoutFeedback>
</View>
But this will make focus lose when I click change image. So how can I get the aim?
You can use secureTextEntry
prop.