├── .DS_Store ├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── android ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── wheelpicker │ │ ├── LoopListener.java │ │ ├── LoopRunnable.java │ │ ├── LoopTimerTask.java │ │ ├── LoopView.java │ │ ├── LoopViewGestureListener.java │ │ ├── MTimer.java │ │ ├── MessageHandler.java │ │ ├── WheelPickerManager.java │ │ └── WheelPickerPackage.java │ └── res │ └── values │ ├── strings.xml │ └── styles.xml ├── example ├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.js ├── __tests__ │ └── App-test.js ├── android │ ├── app │ │ ├── _BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example-tvOS │ │ └── Info.plist │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── example-tvOS.xcscheme │ │ │ └── example.xcscheme │ ├── example.xcworkspace │ │ └── contents.xcworkspacedata │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── metro.config.js ├── package.json └── yarn.lock ├── index.d.ts ├── index.tsx ├── package.json └── src ├── DatePicker.android.js ├── DatePicker.ios.tsx ├── TimePicker.android.js ├── TimePicker.ios.tsx ├── Utils.js ├── WheelPicker.android.js ├── WheelPicker.ios.tsx └── assets ├── datePickerAndroid.gif ├── datePickerIos.gif ├── pickerAndroid.gif ├── pickerIos.gif ├── timePickerAndroid.gif └── timePickerIos.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cero-Studio/ReactNativeWheelPicker/107dc6b6d7d43d6eed3f0f53bf88780597922991/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"], 3 | "ignore": false 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | 4 | # Android/IntelliJ 5 | # 6 | build/ 7 | .idea 8 | .gradle 9 | local.properties 10 | *.iml 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | he MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React native wheel picker V2 2 | 3 |

4 | 5 | 6 | 7 |

8 | 9 | A simple Wheel Picker for Android (For IOs is using Picker from react-native) 10 | 11 | ## Example 12 | 13 | You can clone the repo and run example from ./example folder 14 | 15 | ## Installation 16 | 17 | `yarn add react-native-wheel-picker-android` 18 | 19 | ![](./src/assets/pickerAndroid.gif) 20 | ![](./src/assets/pickerIos.gif) 21 | 22 | ## Automatic Installation 23 | 24 | `react-native link react-native-wheel-picker-android` 25 | 26 | ## Manual Android Installation 27 | 28 | In `android/settings.gradle` 29 | 30 | ``` 31 | include ':react-native-wheel-picker-android' 32 | project(':react-native-wheel-picker-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wheel-picker-android/android') 33 | ``` 34 | 35 | In `android/app/build.gradle` 36 | 37 | ``` 38 | dependencies { 39 | ... 40 | compile project(':react-native-wheel-picker-android') 41 | } 42 | ``` 43 | 44 | In `android/app/src/main/java/com/PROJECT_NAME/MainApplication.java` 45 | 46 | ``` 47 | @Override 48 | protected List getPackages() { 49 | return Arrays.asList(new MainReactPackage(), new WheelPickerPackage()); 50 | } 51 | ``` 52 | 53 | # Usage 54 | 55 | ```js 56 | import { 57 | WheelPicker, 58 | TimePicker, 59 | DatePicker 60 | } from "react-native-wheel-picker-android"; 61 | import React, { Component } from "react"; 62 | import { AppRegistry, StyleSheet, Text, View, Button } from "react-native"; 63 | 64 | const wheelPickerData = [ 65 | "sunday", 66 | "monday", 67 | "tuesday", 68 | "wednesday", 69 | "thursday", 70 | "friday" 71 | ]; 72 | 73 | class MyPicker extends Component { 74 | state = { 75 | selectedItem: 0 76 | }; 77 | 78 | onItemSelected = selectedItem => { 79 | this.setState({ selectedItem }); 80 | }; 81 | 82 | onPress = () => { 83 | this.setState({ selectedItem: 3 }); 84 | }; 85 | 86 | render() { 87 | return ( 88 | 89 |