I have this weird problem where my icon functionality does not work on Android but works on iOS and I'm puzzled.
Basically what I would like to achieve is to press on the icon with eye and show or hide password when user is signing in.
<Controller
name="password1"
control={control}
render={({ field: { onChange, value, name } }) => (
<>
<TextInput
label="Password"
secureTextEntry={!showPassword}
returnKeyType="next"
textContentType="password"
onChangeText={onChange}
value={value}
onBlur={() => trigger(name)}
keyboardType="email-address"
testID="password-input"
error={errors?.password1?.message}
right={
<RNPTextInput.Icon
icon={showPassword ? EyeOff : EyeOn}
onPress={() => {
setShowPassword(!showPassword);
}}
/>
}
/>
</>
)}
/>
What I did try is to play around and replace the RNTextInput.Icon to TouchableOpacity but ain't workin.
SEND HALP RN IS SO WEIRD SOMETIMES I LOVE IT