Answers for "change android datetime picker color react native"

0

change android datetime picker color react native

In android/app/src/main/res/values/styles.xml:
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:textColor">#000000</item>
        <!-- Add your date time picker here. -->
        <item name="android:datePickerDialogTheme">@style/Dialog.Theme</item>
    </style>

    <!-- Add Date time picker dialog theme here. -->
    <style name="Dialog.Theme" parent="Theme.AppCompat.Light.Dialog">
        <item name="colorAccent">#f3ca1b</item>
        <item name="android:textColorPrimary">#000000</item>
    </style>
</resources>
Posted by: Guest on July-08-2021
0

change react native datetime picker background color "android"

i want to share how i can change theme color of the picker.
in android/app/src/main/res/values/styles.xml i put:

  <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:datePickerDialogTheme">@style/DialogDatePicker.Theme</item>
    </style>

<style name="DialogDatePicker.Theme" parent="Theme.AppCompat.Light.Dialog">
        <item name="colorAccent">@color/ocean_green</item>
        <item name="android:textColor">@color/dove_gray</item>
        <item name="android:textColorPrimary">@color/dove_gray</item>
    </style>

* colorAccent is the color of header of picker and selector

* textColor is the color of numbers and text buttons

* textColorPrimary is the color of text of month.
I hope it works for you, regards.

Tip for the those using the time picker and would like to change the colors.
Change android:datePickerDialogTheme to android:timePickerDialogTheme

(======================need more help visit the blow linhk========================)
https://hashnode.com/post/step-by-step-guide-on-how-to-change-background-and-text-color-of-android-date-time-picker-in-react-native-ckacitc6j02lvb6s1u01uyzzl
Posted by: Guest on May-17-2021

Code answers related to "change android datetime picker color react native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language