-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the default theme color #106
Comments
Hey @ugendrang , please take a look at #29 |
Thank you @mmazzarolo, its working after below changes in 'styles.xml'
|
@ugendrang you missed an opening tag over there. :-) |
@ugendrang where can I find the |
It's always showing blue theme. How ever i use "#FFA500" i.e. orange |
@mmazzarolo Is it possible to change color with using Expo ? Or we have to eject the project in order to change the color ? I have read issue #29, issue #106 and some other related thread, edit all styles.xml file in my project folder and even create an android directory tree with styles.xml in it. |
I don't think it's available in Expo yet: expo/expo#313 |
Hi @mmazzarolo
doesn't work for me with
Any workaround? |
ciao @paolospag ! No idea honestly, have you already tried checking in the React-Native issues? 🤔 Maybe this issue might be helpful? |
ciao @mmazzarolo 😄 This code: <style name="SpinnerDatePickerDialog" parent="android:Theme.Material.Light.Dialog">
<item name="android:datePickerStyle">@style/MyDatePicker</item>
<item name="android:colorAccent">@color/colorPrimary</item>
<item name="android:colorControlNormal">@color/colorPrimary</item>
</style>
<style name="MyDatePicker" parent="android:Widget.Material.DatePicker">
<item name="android:datePickerMode">spinner</item>
</style> has definitely solved my problem, thank you so much! |
Its not working for me! any other ways |
@ChenhuaWANG22 Try to change primarycolor in Expo. |
I try the below blog for adding datePickerAndroid and it's working fine also provide when a user has multiple input field for date solution. https://infinitbility.com/how-to-add-datepickerandroid-in-react-native-with-color-changes |
Is there any way to change the theme of date picker in an expo managed react native app ? |
You can find the styles.xml file inside your android/app/src/main/res/values |
- Needed to set the styles.xml colorAccent in order to affecting the picker theme accent color on Android - Initial advice from: mmazzarolo/react-native-modal-datetime-picker#106 (comment) - Actual solution inspired by: xamarin/Xamarin.Forms#9033 (comment)
@rakesh-201 This is now possible with Expo config plugins, see https://stackoverflow.com/q/77703362/4350421 |
Currently the datetime picker displays title background, date/time selection color and Footer text(Cancel, Ok) color with green color.
Is it possible to change the default theme color?
The text was updated successfully, but these errors were encountered: