Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - New calendar style DatePicker and TimePicker

Tags:

Is it possible to use the new DatePickerDialog and TimePickerDialog style used in the latest version of android? They can be seen here : New style Date and time pickers

I tried looking for the latest sources of the AOSP Project, but event with that code, I still get the old one (With spinners) - They use the same DatePickerDialog and TimePickerDialog classes, so I was not expecting anything else.

Thanks for your help.

like image 815
Guillaume Jobin Avatar asked Jul 10 '13 19:07

Guillaume Jobin


People also ask

What is DatePicker and TimePicker in android?

Android DatePicker is a widget to select date. It allows you to select date by day, month and year. Like DatePicker, android also provides TimePicker to select time. The android.

What are the modes available in date and time picker?

Each picker provides controls for selecting each part of the time (hour, minute, AM/PM) or date (month, day, year). Using these pickers helps ensure that your users can pick a time or date that is valid, formatted correctly, and adjusted to the user's locale.

Is DatePicker dialog class available in android?

Android App Development for Beginners Android Date Picker allows you to select the date consisting of day, month and year in your custom user interface. For this functionality android provides DatePicker and DatePickerDialog components.


1 Answers

For future reference, the BetterPickers library has added support for the Google Now and Google Calendar date and time pickers from AOSP.

https://github.com/derekbrameyer/android-betterpickers/

I have not been able to properly implement the library tyczj suggested, and the test APK for it even causes an ANR. Better Pickers seems more stable.

Might be worth checking out both if anyone else wants to implement this.

like image 153
Marcus Avatar answered Nov 11 '22 12:11

Marcus