-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picker item list not displaying items on Android #531
Comments
The same thing is happening to me. I'm blowing my head off to try and understand what's happening here. Anyone has a clue? |
I encountered the same problem. Interestingly, it does not display the items on the screen properly without changing the font size. I think Picker.item should give font size value by default or require fontsize. |
My guess is that it does not automatically give the font size for each item in Picker.item and thinks it is 0. That's why it doesn't show the items on the screen. You need to introduce a style into Picker.item. For example,
My code was not listing the items, then
When I added style it started to show properly. David Gallant explained the problem very well and wrote the solution. If I hadn't seen this issue page, I probably wouldn't have been able to solve it. Thanks @DaveFPath. |
Thanks Omer. adding font size to Picker.Item worked |
Is there any way to fix this problem while using RNPickerSelect? |
Describe the bug
For some reason, when using the Android emulator, the picker item list is not showing the item text. The item text is there, I think... but it's not visible. I am not 100% sure, but I think it's a simple styling issue. I can't quite figure out why/where/how the item text is getting set to make it not appear, and I can't debug it with the item inspector because it keeps disappearing when I try to turn on the item inspector.
I have a possible work around, but I would like to see this added to the main source so I don't have to rely on a local copy to do it. That is to add the item.style to the Picker.Item properties. That way we can pass in the styles for the items to use.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the item text to be visible.
Screenshots
Without Styles:
With styles and fontsize set to 20:
Additional details
Reproduction and/or code sample
Then in my code:
The text was updated successfully, but these errors were encountered: