Skip to content

maintainlyhq/react-native-numberpicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-numberpicker

Installation

npm install react-native-numberpicker --save

(Ensure you rely on npm versioning via https://www.npmjs.com/package/react-native-numberpicker - not the github releases.)

For Android:

// file: android/settings.gradle
...

include ':react-native-numberpicker', ':app'
project(':react-native-numberpicker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-numberpicker')
// file: android/app/build.gradle
...

dependencies {
    ...
    compile project(':react-native-numberpicker')
}
// file: android/app/source/main/java/com/{projectName}.MainActivity.java
...
io.fixd.reactnativenumberpicker.RNNumberPickerPackage;
...
.addPackage(new RNNumberPickerPackage(this))
...

Usage

let NumberPicker = require('react-native-numberpicker');
<NumberPicker
	style={styles.picker}
	height={150}
	values={values}
	selected={selectedIndex}
	onSelect={(value) => {
		console.log('onSelect', value);
	}}
	/>

About

Android's NumberPicker bridge for ReactNative

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published