I am trying to give custom look and feel to the datePicker popup. But I could not find any direct fields to change the header Background and Font Color of text shown in popup
Asked
Active
Viewed 70 times
0
-
Because if you want to change that you need to do it natively for the platform, and its based of the theme of your application – FreakyAli Feb 01 '23 at 09:04
-
@FreakyAli, Thanks For your Response. Do you have any reference to change the Theme only for a specific control, not for the overall application? – Nishant Sharma Feb 01 '23 at 12:18
-
https://stackoverflow.com/a/29014475/7462031 – FreakyAli Feb 01 '23 at 13:09
1 Answers
0
You can try using below code inside styles.xml in Android Project.
<resources>
<style name="MainTheme" parent="MainTheme.Base">
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<!--header background-->
<item name="colorAccent">#fff</item>
<!--header textcolor-->
<item name="android:textColorPrimaryInverse">#808080</item>
<!--body background-->
<item name="android:windowBackground">#fff</item>
<!--selected day-->
<item name="android:colorControlActivated">#4B6043</item>
<!--days of the month-->
<item name="android:textColorPrimary">#808080</item>
<!--days of the week-->
<item name="android:textColorSecondary">#808080</item>
<!--cancel&ok-->
<item name="android:textColor">#808080</item>
</style>

ponnu.m
- 113
- 6