Describe the bug
Pressing anywhere on the screen (except my TabNavigator) is causing the Selection modal to appear.
To Reproduce
<Picker
hideIcon={true}
items={[ {label: '+1', value: '+1'}, {label: '+64', value: '+64'} ]}
onValueChange={(value, idx) => this.handleCodeSelection(value, idx)}
placeholder={{}}
style={{inputAndroid: { color: colors.white, height: 50, width: 50, backgroundColor: colors.white }}}
useNativeAndroidPickerStyle={false}
/>
Expected behavior
Only open the Selection modal when the Picker element is pressed.
Smartphone (please complete the following information):
Reproduction and/or code sample
Provide a link to a reproduction of this issue on https://snack.expo.io or a good explanation on why you can not. Not including a link will result in a significant delay in our ability to address this issue.
Can you attach a snack.expo.io reproduction of the issue?
Hi @Friendly-Robot. I had the same problem as you. It's weird, but when I pass style for headlessAndroidContainer with backgroundColor property it's no longer reproducing. Maybe it will help you too.
<Picker
...
style={{
headlessAndroidContainer: Styles.headlessAndroidContainer
}}
/>
...
headlessAndroidContainer: {
backgroundColor: 'transparent',
},
To solve this problem you should only add the following
聽聽 viewContainer: {
聽聽聽聽 position: 'relative',
聽聽 },
聽聽 headlessAndroidPicker: {
聽聽聽聽 left: 0,
聽聽聽聽 width: '100%',
聽聽聽聽 height: '100%',
聽聽 },
He painted the blue background to show what happens with headlessAndroidPicker
Possibly solved by #128
@Friendly-Robot @VKravchukEleks @apolineaire - can you check if v5.2.3 fixes the issue? (thanks @andercard )
Most helpful comment
To solve this problem you should only add the following
聽聽 viewContainer: { 聽聽聽聽 position: 'relative', 聽聽 }, 聽聽 headlessAndroidPicker: { 聽聽聽聽 left: 0, 聽聽聽聽 width: '100%', 聽聽聽聽 height: '100%', 聽聽 },He painted the blue background to show what happens with headlessAndroidPicker
https://imgur.com/a/5v6gDnE