-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Button background color does not update when switching themes on Android #4570
Comments
@tonihm96 what is supposed to be the expected background when switched to dark mode? |
it is supposed to be the primary dark color |
Experiencing same issue when using |
@Acex187x I'm in the process of updating our app
When I switch "react-native-paper": "5.12.5" |
Yes, I am also facing the same issue. For now, I am using TouchableOpacity to create the button, and the theming works fine with it. Once the issue is fixed, we can switch back to React Native Paper's Button component. I hope many of us are facing the issue on upgrading to latest version of react native. Here is my code.
OfCourse everyone knows the above approach, but anyway it might help us. |
I've the same issue. Please solve it fast because I can't update my app's now. |
I'm also experiencing the same issue, the background color of the Button doesn't update while the text color does. |
Thanks @LeandroPata I think it has to do with this change: I hope it will be fixed soon. |
Hi, I confirm the bug. In my case, this happened when I moved from React version 18.2.0 -> 18.3.1 and React Native 0.73.2 -> 0.76.3 I also confirm the suggestion from @LeandroPata works as expected. |
Current behaviour
On Android, when switching the provided theme between dark and light modes, the button's background color does not update.
Expected behaviour
The button's background color should update accordingly when the theme is switched between dark and light modes.
How to reproduce?
https://snack.expo.dev/@tonihm96/react-native-paper-button-background-color
Preview
screen-recording.mp4
What have you tried so far?
I created a wrapper Button component based on the one provided by the library and passed the desired background color via the contentStyle prop.
Your Environment
The text was updated successfully, but these errors were encountered: