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.
You can specify the spinner-style time picker by setting the timePickerMode attribute to "spinner". The default value on Material is "clock".
You can Programatically use the spinner mode using the custom class. For earlier versions From lolipop it will change the timepicker mode from clock to spinner and it's also allow you to set disable selection of time after a particular time (using setmax() & setmin()). In the below code i used set max() to limit the maximum time.