android - Style DatePickerDialog selector background -


does know how style black boxes surrounding date selectors match background of datepickerdialog? broken datepickerdialog

for reference here style i'm using alertdialogs:

<style name="alertdialogstyle" parent="theme.appcompat.light.dialog.alert">     <item name="android:windowbackground">@android:color/white</item>     <item name="android:colorbackground">@android:color/white</item>     <item name="coloraccent">@color/group_blue_800</item>     <item name="android:textcolorprimary">@color/secondary_text</item>     <item name="android:textcolor">@color/primary_text</item>     <item name="android:linespacingmultiplier">1.2</item>     <item name="colorcontrolnormal">@android:color/white</item>     <item name="colorprimary">@android:color/white</item>     <item name="colorprimarydark">@android:color/white</item> </style> 

i resolved creating standalone style datepickers/timepickers pre-lollipop devices:

<style name="prelollipopdatepickerstyle" parent="theme.appcompat.light.dialog">         <item name="android:linespacingmultiplier">1.2</item>         <item name="android:windowcontentoverlay">@null</item>         <item name="android:windowisfloating">true</item>         <item name="android:windowanimationstyle">@android:style/animation.dialog</item>         <item name="android:windowbackground">@android:color/white</item>         <item name="android:colorbackground">@android:color/white</item>         <item name="android:textcolorprimary">@color/secondary_text</item>         <item name="android:textcolorsecondary">@color/secondary_text</item>         <item name="android:textcolor">@color/primary_color</item>         <item name="coloraccent">@color/group_blue_800</item>     </style> 

i create datepicker/timepicker using constructor pass theme resource id pre-lollipop devices:

datepickerdialog datepickerdialog; if (androidutils.islollipop()) {     datepickerdialog = new datepickerdialog(         getactivity(),         new enddatetimeselectedlistener(),         enddatetimeexclusive.get(calendar.year),         enddatetimeexclusive.get(calendar.month),         enddatetimeexclusive.get(calendar.day_of_month)); } else {     datepickerdialog = new datepickerdialog(         getactivity(),         r.style.prelollipopdatepickerstyle,         new enddatetimeselectedlistener(),         enddatetimeexclusive.get(calendar.year),         enddatetimeexclusive.get(calendar.month),         enddatetimeexclusive.get(calendar.day_of_month)); }  datepickerdialog.show(); 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -