1.2.1 • Published 5 years ago

alopeyk-picker v1.2.1

Weekly downloads
4
License
MIT
Repository
-
Last release
5 years ago

alopeyk-picker

iOS like Picker plugin for android

Alt Text

Getting started

$ npm install alopeyk-picker --save

Mostly automatic installation

$ react-native link alopeyk-picker

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.alopeyk.nativemodule.RNPickerPackage; to the imports at the top of the file
  • Add new RNPickerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':alopeyk-picker'
    project(':alopeyk-picker').projectDir = new File(rootProject.projectDir, 	'../node_modules/alopeyk-picker/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':alopeyk-picker')

Usage

import {PickerView, DatePickerView} from 'alopeyk-picker';

// TODO: What to do with the module?
<PickerView .../>
<DatePickerView .../>

PickerView Properties

PropsTypeis Required
onSelectedItemChanged'func'-
selectedItem'number'-
fontSize'number'-
fontFamily'string'-
cyclic'bool'-
color'string'-
backgroundColor'string'-
selectedItemBorderColor'string'-
items'array'True
itemHeight'number'-

DatePickerView Properties

PropsTypeis Required
onSelectedItemChanged'func'-
selectedDate'Date' 'number'-
startDate'Date' 'number'-
endDate'Date' 'number'-
fontSize'number'-
fontFamily'string'-
color'string'-
backgroundColor'string'-
selectedItemBorderColor'string'-
itemHeight'number'-
1.2.1

5 years ago

1.2.0

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago