Android API 21 - TimePicker widget

mars3142 picture mars3142 · Nov 14, 2014 · Viewed 16.5k times · Source

I've got a problem with the TimePicker widget on API 21. Until API 19 the TimePicker was an up-/down-list like iOS, but in 21+ it's round, like the one in the calendar app.

How can I use the old one in 21+, because it breaks my design, if it is the new widget.

Answer

alanv picture alanv · Nov 16, 2014

You can specify the spinner-style time picker by setting the timePickerMode attribute to "spinner". The default value on Material is "clock".

<TimePicker
    ...
    android:timePickerMode="spinner" />