i’m trying to create an app and i’m using touchable opacity instead of button.
i just wanna disable voice that on press touchable opacity component.
<TouchableOpacity activeOpacity={1} touchSoundDisabled={true} onPress={this._onPress}>
...
</TouchableOpacity>
i tried to touchSoundDisabled={true}
but not working
2
Answers
I’m not sure which version of react native are you using, but I’m guessing what you are looking for is
android_disableSound
prop rather thantouchSoundDisabled
You can use Pressable in place of TouchableOpacity,
Just add
<Pressable android_disableSound={true} ></Pressable>
one drawback is you cant get onTouch animations, but pressable is powerful