问题
I am trying to build a language selection picker in react native which has a picture of the country's flag next to the label, like this:
The icons have to be images and not unicode. I've had a look around but there doesn't seem to be anything available. Does anyone know of anything I can use to create this?
If nothing can be used then I will create a custom picker, I aim to make use of a ScrollView to handle the scrolling but I am not sure what I can use to replicate the rotation effect of the native iOS picker, so if anyone can help me with this also I would really appreciate it.
回答1:
You can try this: https://github.com/xcarpentier/react-native-country-picker-modal
It's not inside a native picker like your screenshot, but it should do what you are asking for.
来源:https://stackoverflow.com/questions/52552916/react-native-picker-with-image-icon