/WheelPicker

iOS style scroll wheel (style similar to UIPickerView)

Primary LanguageKotlinApache License 2.0Apache-2.0

WheelPicker

iOS-style scroll wheel picker

GitHub tag (latest SemVer) Maven Central codebeat badge

Read this in other languages: 简体中文

Feature

  1. Day / Night Mode Support
  2. Customizable style
  3. Support circular scrolling
  4. Support vibration feedback

Preview

Preview

Component

  1. DatePicker

    DatePicker Usage

    year-month-day or year-month picker

    support max and min date limits

    Day Night
    Day Night
  2. WeekdayTimePicker

    WeekdayTimePicker Usage

    weekday-hour-minute picker

    Day Night
    Day Night
  3. DayTimePicker

    DayTimePicker Usage

    day-hour-minute picker

Download

Download the latest AAR from Maven Central via Gradle:

implementation 'sh.tyy:wheelpicker:0.4.0'

Custom

Customize the style of the item in the same way as the RecyclerView. You need to provide a BaseWheelPickerView.Adapter and a BaseWheelPickerView.ViewHolder.

Special note: the itemView of the ViewHolder needs to be a fixed height view.

After all, WheelPicker is based on RecyclerView. Doing so will ensure as much performance and reliability as possible.

Custom WheelPicker please refer to CustomWheelPickerView.kt

This is what the custom example looks like: Custom

For more complex customizations (e.g. multiple columns), please refer to WeekdayTimePickerView

Inspiration and Reference

WheelPicker is inspired by devilist/RecyclerWheelPicker.

License

WheelPicker is available under the Apache 2.0 license. See the LICENSE file for more info.