1.1.2 • Published 9 years ago
react-native-slider-android v1.1.2
React-Native Slider for Android
A slider component for selecting integer values. (Similar to SliderIOS.)
Example
...
import SliderAndroid from 'react-native-slider-android';
...
<SliderAndroid onValueChange={this.onValueChange} value={6}
minimumValue={-10} maximumValue={10} style={{height: 30, width: 300,}}/>
Install
Step 1 - Install the npm package
$ npm install react-native-slider-android --save
Step 2 - Update Gradle Settings
// file: android/settings.gradle
...
include ':react-native-slider-android', ':app'
project(':react-native-slider-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-slider-android/app')
Step 3 - Update app Gradle Build
// file: android/app/build.gradle
...
dependencies {
...
compile project(':react-native-slider-android')
}
Step 4 - Register React Package
// MainActivity.java
import io.mezon.rnslider.RNSliderPackage;
...
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSliderPackage() // <-- Register package here
);
}
##Props
- minimumValue : number
- maximumValue : number
- value (This is the initial value.) : number
- onValueChange : function
1.1.2
9 years ago
1.1.1
9 years ago
1.1.0
10 years ago
1.0.14
10 years ago
1.0.13
10 years ago
1.0.12
10 years ago
1.0.11
10 years ago
1.0.10
10 years ago
1.0.9
10 years ago
1.0.8
10 years ago
1.0.7
10 years ago
1.0.6
10 years ago
1.0.5
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago