react-native-slider-android

A slider component for selecting integer values.

Showing:

Popularity

Downloads/wk

10

GitHub Stars

11

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial