explaingit

bigkoo/android-pickerview

13,445JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

Android-PickerView is a Java library that adds iOS-style scrolling wheel selectors to Android apps for picking dates, times, or cascading columns of options like province and city.

Mindmap

mindmap
  root((pickerview))
    What it does
      Scrolling wheel picker
      Date and time selection
      Linked option columns
    Features
      Loop scrolling
      Dialog overlay
      Callback on confirm
    Tech stack
      Java
      Android SDK
      Gradle dependency
    Use cases
      Date picker UI
      Location cascade picker
      Options selector
    Gotchas
      Month starts at zero
      Project unmaintained
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a date and time picker with scrollable wheels to an Android app using a single Gradle dependency.

USE CASE 2

Build a location selector with three linked columns (province, city, district) that update based on the previous selection.

USE CASE 3

Display a customizable options picker as a dialog overlay with a callback when the user confirms.

USE CASE 4

Set custom date range boundaries and enable loop scrolling on a date picker in an Android app.

Tech stack

JavaAndroidGradle

Getting it running

Difficulty · easy Time to first run · 30min

Project is unmaintained, use the jcenter dependency or import source as a module. Java Calendar month indexing starts at 0, account for this in date ranges.

In plain English

Android-PickerView is a UI component for Android apps that provides a scrolling wheel selector, the kind of spinning reel control that iOS users will recognize, where you scroll through a list of values and the one in the center is selected. The README, written primarily in Chinese, opens with an important note: the project is no longer being maintained. The older version published through the jcenter library still works, but the author now suggests downloading the source code and bringing it into your own project as a module to customize as needed. The library offers two types of picker. One is a time picker that lets users choose a date or time in formats like year-month-day-hour-minute, or shorter combinations such as year-month only. The other is an options picker that presents one, two, or three columns of choices. A typical example in the README is selecting a Chinese province, then a city in that province, then a district in that city, where each column updates based on what was picked in the previous one. This dependent behavior is called linkage, and you can enable or disable it. There are many customization options. You can set start and end date boundaries for the time picker, show or hide the unit labels (like the characters for year and month), make the wheel scroll endlessly in a loop, adjust text size and color, change the divider lines between items, and display the entire picker as a dialog overlay. Selections are returned to your code through a callback function that fires when the user confirms. Installation is done by adding a Gradle or Maven dependency. The README shows code samples for creating both picker types and wiring up a listener. It also flags a specific gotcha: Android's built-in Calendar class counts months starting from zero, so January is 0 and December is 11, and you must account for this when specifying a date range or you will get off-by-one errors. Full method documentation and version history live in the project wiki.

Copy-paste prompts

Prompt 1
Show me how to add Android-PickerView to my Android project and create a date picker that shows year, month, and day wheels.
Prompt 2
I need a city picker in my Android app where selecting a province shows its cities, and selecting a city shows its districts. Show me how to set up the linked columns with Android-PickerView.
Prompt 3
How do I customize the Android-PickerView time picker to only show month and year, with custom text colors and no unit labels?
Prompt 4
I'm getting off-by-one errors with month values in Android-PickerView. Explain the Java Calendar month-zero indexing issue and how to correct it.
Open on GitHub → Explain another repo

← bigkoo on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.