picker icon indicating copy to clipboard operation
picker copied to clipboard

Dropdown/Dialog isn't working in Android

Open Ritzz03 opened this issue 5 years ago • 6 comments

Dropdown/Dialog isn't working in Android

Hello! I am currently trying to create the dropdown for both iOS and Android I checked in iOS and it was working fine but when I checked it on android I can't see the dropdown or dialog box

This is the code to the picker:

<Picker
  onValueChange={(itemValue, itemIndex) => {
    this.setState({blaVal14:itemValue})
    console.log(this.state.blaVal14)
  }}
  selectedValue={this.state.blaVal14}
  mode="dialog"
  prompt="Select" 
  itemStyle={{
        justifyContent: 'flex-start',
  }}
>
  <Picker.Item label="Buckel" value="Buckel" />
  <Picker.Item label="Lingual" value="Lingual" />
  <Picker.Item label="Accessory" value="Accessory" />
</Picker>

If you have any idea why this is happening please let me know...Thanks!

Ritzz03 avatar May 30 '21 10:05 Ritzz03

I'm seeing Android crash without error. iOS is fine.

peterb0yd avatar Jun 08 '21 19:06 peterb0yd

I'm seeing Android crash without error. iOS is fine.

Having the same issue, RN version: 0.64.1

kubarskii avatar Jun 09 '21 14:06 kubarskii

Looks like the "label" prop field can't be undefined or it crashes on Android.

Peter

On Wed, Jun 9, 2021 at 7:50 AM Alexander Kubarskii @.***> wrote:

I'm seeing Android crash without error. iOS is fine.

Having the same issue, RN version: 0.64.1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/react-native-picker/picker/issues/273#issuecomment-857761771, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMH5FT3L6SPECWN2RY6ADLTR55RZANCNFSM45ZGOMPQ .

peterb0yd avatar Jun 09 '21 17:06 peterb0yd

Seems to be fixed with

React-native 0.64.2 @react-native-picker/picker 1.16.3

Victor-Jansson avatar Jul 12 '21 18:07 Victor-Jansson

Facing this issue on:

react-native 0.64.2
@react-native-picker/picker 1.16.4

On some Android devices, I see the dropdown. On others, it seems like it doesn't show up.

Evan-Younan avatar Aug 04 '21 13:08 Evan-Younan

Adding width on both parent View and the Picker component itself solved my issue.

Adrian-Swifter avatar Sep 15 '21 00:09 Adrian-Swifter