[Android] - Icon not pressable
See original GitHub issueDescribe the bug
When using a custom Icon component within the RNPickerSelect component I am unable to press the icon and open the Picker on Android. It works perfectly as expected on iOS.
To Reproduce
See the code below.
Expected behavior
Expect to click on the Icon to the right and for the Picker modal to open up. This is not the case on Android, however it works perfectly on iOS.
Screenshots
iOS:
Android:
Additional details
- Device: [e.g. Pixel 3 XL (Emulator)]
- OS: [Android 10.0]
- react-native-picker-select version: [^6.3.3]
- react-native version: [0.59.10]
- react version: [16.8.3]
Reproduction and/or code sample
https://snack.expo.io/Hkrt-UidS
<RNPickerSelect
onValueChange={(value, index) => this.handleSelection(value, index)}
value={this.state.college}
placeholder={{
label: 'Select your college/university',
value: null,
}}
style={{
...pickerSelectStyles,
iconContainer: {
top: 10,
paddingRight: scaleFontSize(33)
},
}}
items={colleges}
Icon={() => {
return <Icon
name="ellipsis-h"
type="font-awesome"
underlayColor="transparent"
iconStyle={styles.editIcon}
/>
}}
/>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Android application icon not showing up - Stack Overflow
Make sure the icon is stored with the name icon.png in those folders. · Make sure android has a drawable/icon resource. Check this...
Read more >Change the app icon - Android Developers
In this codelab, you will change the app icon for an app.
Read more >Fix an installed Android app that isn't working - Google Support
Step 1: Restart & update · Open the Google Play Store app Google Play . · At the top right, tap the profile...
Read more >Change App Icon in React Native for Android and iOS
I tried for android as well as IOS. ios working perfectly but in android not getting the expected result. the device which I'm...
Read more >4.1: Buttons and clickable images · GitBook - GitHub Pages
Choosing an icon · Expand app > res in the Project > Android pane, and right-click (or Command-click) the drawable folder. · Choose...
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
So, I’ve actually managed to resolve this issue. Turned out the missing prop that was preventing the Icon from being clickable was
useNativeAndroidPickerStyle={false}
. Once this was added everything worked perfectly as expected. Thanks for your help @lfkwtz 👍Same issue here with: physical device running Android 11 react-native-picker-select 8.0.2 react 16.13.1 react-native 0.63.2
<RNPickerSelect>
with the following props as suggested in this discussion doesn’t solve the issue: