[Android] Button that created TouchableOpacity not triggering first click
See original GitHub issueHi,
I create a button in modal and When my code like this below
_myFunc = () => {
/* code here */
}
<TouchableOpacity
onPress={this._myFunc}
>
<Text>test<Text>
</TouchableOpacity>
OnPress event not trigger on the first click and i have to click more than one.Any idea?
I have tried to use ToucheWithoutFeedback, TouchabeNativeFeedback and TouchableHighligth.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13
Top Results From Across the Web
React native TouchableOpacity onPress not working on Android
I had the same issue, all TouchableOpacity buttons were working fine in iOS build, but there was one in Android that did not...
Read more >TouchableOpacity - React Native
A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, dimming it.
Read more >React Native touchable vs. pressable components
Here, we created three custom buttons by using the TouchableOpacity component as the base element. We can: Adjust the pressed opacity level with ......
Read more >React native TouchableOpacity onPress not working on Android
Android : React native TouchableOpacity onPress not working on Android [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >Buttons | React Native Gesture Handler - Software Mansion
function that gets triggered when button changes from inactive to active and vice versa. It passes active state as a boolean variable as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try and import from gesture handler instead of react-native:
import { TouchableOpacity } from "react-native-gesture-handler";
I’m using these options now which are the only ones that work for me. Which TouchableOpacity to use has to be dependent on platform: