-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[android] PlatformColor does not respond to dark | light mode changes on android ? #32823
Comments
PlatformColor seems to be working with wix/react-native-navigations some how but not with react native. pc-template.mp4 |
Keep in mind that in the vid above I use only text from react native. All colors change correctly but not for the text. It requires an app reload |
issue still exists, would love to contribute a fix with minimal assistance. |
Hello. You just need to do a few things for those who use the Expo to make it works automatically.
After that, I could use any code as
that worked normally. Sources |
I'm not talking about a it should switch automatically when the device color scheme changes. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Any updates? |
Im also facing this issue but not found any solution yet. Appearance.setColorScheme can set theme for PlatformColor but only before using it. No changes after using it on view&text etc. |
You'll need to restart the activity on Android for the new colors to take effect. |
Do we have any update on this? |
Description
PlatformColor on android does not pickup the correct color on theme changes as it does on IOS.
it's worth mentioning that
useColorScheme
does pick up the device theme correctly.Jan-02-2022.13-37-48-android-issue.mp4
Version
66.4
Output of
npx react-native info
Steps to reproduce
after creating a react native project.
[1] create a
values-night/colors.xml
andvalues/colors.xml
insideandroid/app/src/main/res
[2] add both dark mode and light mode colors to both
colors.xml
files accordingly.[3] rebuild the app.
[4] change your device theme from settings
observation:
colors don't react to the device theme.
[5] try changing your device theme then reloading from dev menu.
observation:
colors change & respect the device theme after reload.
[6] removing
uiMode
fromandroid:configChanges
inside insideAndroidManifest.xml
does resolve the issue however it's performant ( the application would then be torn down and recreated with the theme change ).Snack, code example, screenshot, or link to a repository
https://github.com/a-eid/platformColorAndroidIssue
The text was updated successfully, but these errors were encountered: