Can we display DatePicker Lopipop style on kitkat devices?

I am trying to show dump like lollipop in device 4.4.2. Can someone give me some idea where to start or is it even possible?

+6
source share
2 answers

As more people switch to the construction of the Material, it’s good to have the answer as a reference.

First of all, the date picker does NOT come with a theme on devices prior to Lollipop.

But the good news is that you don’t need to transfer the library yourself, others have already done it.

Check out https://github.com/wdullaer/MaterialDateTimePicker or https://github.com/CiTuX/datetimepicker

Both libraries support android version 4.0 and higher (API level 14). I personally tried the 1st one and it works great.

+6
source

For those who support Android 2.1+ and / or use the support-v4 library or AppCompatActivity from support-v7 , I suggest this library . This is a clone of Flavien Laurent Date and Time Picker with some improvements. Both are based on the Official Google Date and Time Sample for Android 4.3+ , but adapted for Android 2.1+.

https://github.com/wdullaer/MaterialDateTimePicker only works with Android 4.0+ and its DatePickerDialog extends android.app.DialogFragment , which is useless if you use android.support.v7.app.AppCompatActivity because it works with fragments that extend android.support.v4.app.Fragment .

0
source

Source: https://habr.com/ru/post/980660/


All Articles