Datepicker dialog without calendar visualization in lollipop [spinner mode]?
Solution 1:
DatePickerDialog uses the dialog theme specified by your activity theme. This is a fully-specified theme, which means you need to re-specify any attributes -- such as the date picker style -- that you've set in your activity theme.
<style name="MyAppTheme" parent="android:Theme.Material">
<item name="android:dialogTheme">@style/MyDialogTheme</item>
<item name="android:datePickerStyle">@style/MyDatePicker</item>
</style>
<style name="MyDialogTheme" parent="android:Theme.Material.Dialog">
<item name="android:datePickerStyle">@style/MyDatePicker</item>
</style>
<style name="MyDatePicker" parent="android:Widget.Material.DatePicker">
<item name="android:datePickerMode">spinner</item>
</style>
Note: Due to Issue 222208, this will not work in Android N / API 24. It has already been fixed in the platform for the next release. There is no workaround available for API 24 devices.
Solution 2:
Apply the Holo_theme in the code level got worked for me.
new DatePickerDialog(getActivity(),android.R.style.Theme_Holo_Dialog,this, year,month, day);