SCHLIESSEN
SCHLIESSEN



Android PickerView


Wed 12.08.2020 13:00 von Admin

Announcing our first open source library.

 

Why develop this library?

I found existing Pickers to be quite limiting.

 

DatePicker and TimePicker

They can be found in the official Pickers documentation.

The name already gives it away. They only work with either date or time data.

 

Hacking the NumberPicker

The official NumberPicker can be hacked to display custom strings instead. To do this you have to use the setDisplayedValues method.

However, styling is practically impossible.

 

Existing Libraries

I haven't been able to find a library which fulfills all my criteria. Either they were:

 

What does our PickerView do better?

 

Example usages

Minimal configuration

<ch.swissdev.pickerview.PickerView
    app:orientation="vertical" />

 

With fading color

<ch.swissdev.pickerview.PickerView
    app:fadeColor="@android:color/black"
    app:orientation="vertical" />

 

With highlighting color

<ch.swissdev.pickerview.PickerView
    app:selectedItemColor="#6200EE"
    app:fadeColor="@android:color/black"
    app:orientation="vertical" />

 

Oriented horizontally

<ch.swissdev.pickerview.PickerView
    app:selectedItemColor="#6200EE"
    app:fadeColor="@android:color/black"
    app:orientation="horizontal" />

 

With images

<ch.swissdev.pickerview.PickerView
    app:applyColorFilterToImageViews="true"
    app:selectedItemColor="#6200EE"
    app:fadeColor="#03DAC5"
    app:orientation="horizontal" />

 

Where can I get it?

https://github.com/swissdevch/android-pickerview