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.

[Android] - Icon not pressable

See original GitHub issue

Describe 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: Screenshot 2019-10-09 at 13 24 55

Android: Screenshot 2019-10-09 at 13 25 00

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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

44reactions
dooleyb1commented, Oct 11, 2019

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 👍

8reactions
taymericcommented, Nov 12, 2020

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:

useNativeAndroidPickerStyle={false}
fixAndroidTouchableBug={true}
Read more comments on GitHub >

github_iconTop 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 >

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