react-native-android-seekbar
v0.0.2
Published
## Getting started
Downloads
72
Readme
react-native-android-seekbar
Getting started
$ npm install react-native-android-seekbar --save
Mostly automatic installation
$ react-native link react-native-android-seekbar
Manual installation
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.ga2mer.seekbar.RNAndroidSeekbarPackage;
to the imports at the top of the file - Add
new RNAndroidSeekbarPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-android-seekbar' project(':react-native-android-seekbar').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-seekbar/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-android-seekbar')
Usage
import SeekBar from 'react-native-android-seekbar';
<SeekBar style={{
width: 300
}} color={'#e62117'} progress={50} onChange={this.handleChange} onTrackingTouch={this.handleTrackingTouch} max={100} secondaryColor={'grey'} thumbColor={'#e62117'} bgColor={'rgba(0, 0, 0, 0.5)'}/>