I'm trying to show a DatePickerDialog
in my apps. But I realized that the DatePickerDialog
that show up depends on the phone OS. My question is how can I show KitKat
style DatePicker
in Lollipop
OS? I know this is possible because some apps like Facebook is using it.
This is what I want
Try android:calendarViewShown="false"
and android:datePickerMode="spinner"
in the datepicker xml. I believe the former is for Kitkat and below, while datePickerMode
applies to Lollipop.
Finally I resolve that problem , you need to use theme with
<style name="Theme.Transparent" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
with
android:calendarViewShown="false"
android:datePickerMode="spinner"
then it shows kitkat version in lolipop phone if u need some some the mail me any time
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With