react-native-google-places-autocomplete
react-native-google-places-autocomplete copied to clipboard
Bug Report - onPress not firing on Android on all version.
It simply stopped working for all version on Android. I'm not sure why, anybody else getting the issue as well ?
I thought the issue was related to input being inside a Flatlist but actually not! And on ios on the development version it works fine even in release mode but not on TestFlight and app store version.
I am also facing the same issue the onPress event is working fine on ios but not working on Android... If anyone has come to any solution please do let us know.
@hugoh59 @HassanNaeem555 I encountered the same issue while implementing this component a second time inside my app. While the first implementation was working just fine, the second wasn't. At some point I noticed that this started happening once I wrapped the GooglePlaces component in a ScrollView in order to dodge the VirtualizedLists error (see https://github.com/FaridSafi/react-native-google-places-autocomplete/issues/475), something that I didn't do in the first implementation since the screen was quite different. In case you are wrapping the component in the same way, make sure to pass the keyboardShouldPersistTaps='handled' prop to the wrapping ScrollView:
<ScrollView
contentContainerStyle={contentContainerStyle}
horizontal={true}
keyboardShouldPersistTaps='handled' // HERE
scrollEnabled={false}
>
<GooglePlacesAutocomplete ... />
</ScrollView>
Doing so restored the correct onPress behavior on Android.
Same issue, OnPress is working fine in emulator and simulator (Android and IOS) but not working on real android device checked on multiple real device, My device is Oppo
@hugoh59 @HassanNaeem555 I encountered the same issue while implementing this component a second time inside my app. While the first implementation was working just fine, the second wasn't. At some point I noticed that this started happening once I wrapped the GooglePlaces component in a ScrollView in order to dodge the VirtualizedLists error (see #475), something that I didn't do in the first implementation since the screen was quite different. In case you are wrapping the component in the same way, make sure to pass the keyboardShouldPersistTaps='handled' prop to the wrapping ScrollView:
<ScrollView contentContainerStyle={contentContainerStyle} horizontal={true} keyboardShouldPersistTaps='handled' // HERE scrollEnabled={false} > <GooglePlacesAutocomplete ... /> </ScrollView>
Doing so restored the correct onPress behavior on Android.
Thanks! this fixed my issue