react-native-segmented-control-android
v1.0.0
Published
Segmented Control on Android for React Native like SegmentedControlIOS
Downloads
2
Readme
react-native-segmented-control-android
Segmented Control on Android for React Native like SegmentedControlIOS
Getting started
$ npm install react-native-segmented-control-android --save
Automatic installation
$ react-native link react-native-segmented-control-android
Manual installation
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNSegmentedControlAndroidPackage;
to the imports at the top of the file - Add
new RNSegmentedControlAndroidPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-segmented-control-android' project(':react-native-segmented-control-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-segmented-control-android/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-segmented-control-android')
Usage
import RNSegmentedControlAndroid from 'react-native-segmented-control-android';
// TODO: What to do with the module?
RNSegmentedControlAndroid;