React Native: Build a “Select Item from List” component

时光毁灭记忆、已成空白 提交于 2019-12-11 18:21:59

问题


I want to build a "Picker Menu" inside a screen. I think the time picker popup components are not smooth enough to use, because they require extra clicks instead of just dragging to the wanted element.

The component should return the selected value + change the color of the selected value. I thought of ListView/ ScrollView, but I couldn't find a way to get that working yet.

Below: A great gimp graphic to show what the goal is, placing the Android Time Picker inside the screen as visual example.

That's what it could look like

Any ideas where to start? How can I build something like this with the React-Native components?


回答1:


You can use react-native-wheel-picker or react-native-wheel-picker-android. These libraries provide wheel picker without opening any popup.



来源:https://stackoverflow.com/questions/48034178/react-native-build-a-select-item-from-list-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!