question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onPress function on Android not working

See original GitHub issue

Hey guys if want to add a onPress function to open a link its not working on Android.

On iOS it works very well. I dont know how to fix this 😕

this is my code <ListItem> <TouchableOpacity style={styles.infoScreenOpenMaps} onPress={() => { Linking.openURL( "https://maps.google.com/?q=" + lati + "," + longi ); }} > <Icon style={styles.markerIcon} name="map-marker-outline" type="material-community" color='#8a8a8a' /> <Text>In Google Maps öffnen</Text> </TouchableOpacity> </ListItem>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

44reactions
robertototticommented, Oct 28, 2019

try to add this attribute enabledContentTapInteraction={false}

0reactions
ffchncommented, Jul 26, 2020

try to add this attribute enabledContentTapInteraction={false}

Oh my god, you’re the best! This thing was driving me crazy!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native onPress not working in library in android
I append three attributes so i solve this problem. And the button inside the view use TouchableOpacity from RN for iOS and TouchableOpacity ......
Read more >
Handling Touches - React Native
Pressing the button will call the "onPress" function, which in this case displays an alert popup. If you like, you can specify a...
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 - Android Developers
To define the click event handler for a button, add the android:onClick attribute to the <Button> element in your XML layout.
Read more >
react native svg onPress event not working on real device
Is <G> from the package that you're using for svg's? It may not have defined an onPress property or it might just be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found