Search code examples
androidandroid-5.0-lollipopandroid-timepicker

Android API 21 - TimePicker widget


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.


Solution

  • 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" />