Can not click on location from the list on android device
See original GitHub issueI got the list showing but I can not click on them (Can click on IOS Simulator but can not click on Android device)
Here is my code
<View style={[styles.containerTop]}>
<GooglePlacesAutocomplete
placeholder='Search'
minLength={2} // minimum length of text to search
autoFocus={false}
returnKeyType={'search'} // Can be left out for default return key https://facebook.github.io/react-native/docs/textinput.html#returnkeytype
listViewDisplayed='auto'
fetchDetails={true}
renderDescription={row => row.description} // custom description render
onPress={(data, location = null) => { // 'details' is provided when fetchDetails = true
console.log(data);
console.log(location);
}}
getDefaultValue={() => this.props.currentAddress}
query={{
// available options: https://developers.google.com/places/web-service/autocomplete
key: 'xxxxxxxxx',
language: 'en', // language of the results
types: '', // default: 'geocode'
}}
styles={{
description: {
fontWeight: 'bold',
backgroundColor: 'white',
},
predefinedPlacesDescription: {
color: '#1faadb',
backgroundColor: 'white',
},
textInputContainer: {
backgroundColor: 'rgba(47, 111, 45, 0.0)',
borderBottomWidth: 0,
borderTopWidth: 0,
zIndex: 500,
},
textInput: {
backgroundColor: 'white',
borderBottomWidth: 0.1,
borderColor: 'rgb(47, 111, 45, 0.1)',
},
listView: {
marginTop: 50,
elevation: 1,
backgroundColor: 'white',
position: 'absolute',
zIndex: 500,
},
}}
currentLocation={this.state.currentLocationStatus} // Will add a 'Current location' button at the top of the predefined places list
currentLocationLabel="Current location"
nearbyPlacesAPI='GooglePlacesSearch' // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
GoogleReverseGeocodingQuery={{
// available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro
}}
GooglePlacesSearchQuery={{
// available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/search
rankby: 'distance',
types: 'food',
}}
filterReverseGeocodingByTypes={['locality', 'administrative_area_level_3']} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities
predefinedPlaces={this.state.predefinedList}
predefinedPlacesAlwaysVisible={true}
/>
</View>
containerTop: {
height: 0,
flexDirection: 'row',
padding: 25,
paddingBottom: 50,
marginTop: (isIphoneX() ? 20 : 0),
zIndex: 200,
},
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:17
Top Results From Across the Web
Manage your Android device's location settings
Turn location on or off for your phone · Swipe down from the top of the screen. · Touch and hold Location ....
Read more >Select Current Place and Show Details on a Map
Learn how to find find the current location of an Android device and display details of the place (a ... Select the project...
Read more >Why is my Android phone location information wrong & how to ...
Why is my Android phone location information wrong & how to fix it ; Step 1. Go to Settings > Device care. ;...
Read more >Troubleshooting the Phone Link app - Microsoft Support
Scroll down to Link to Windows, and then select Don't optimize. On select Android devices, the steps may be as follows: Open Android...
Read more >Get the last known location - Android Developers
Using the Google Play services location APIs, your app can request the last known location of the user's device. In most cases, you...
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
Looks like this might have been resolved. Please open a new issue if this is still a problem.
What worked for me was the following (pseudo coded layout scheme):
Make the header container which contains the autocomplete component have no z index stuff . and then put a negative zIndex on the container of the rest of your content. Works on my Pixel with Android 9