react-native-segmented-control-android

1.0.0 • Public • Published

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

  1. 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 the getPackages() method
  1. 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')
    
  2. 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;

Readme

Keywords

Package Sidebar

Install

npm i react-native-segmented-control-android

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • fzcs