-
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] Theme for Alert.alert dialog does not change upon dark mode #28502
Comments
|
|
|
Verified - Alert.alert is still bright white in dark mode on Android. |
The same here |
You can change colors just like in android file
file
file
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> true @android:color/transparent #000000 @style/AlertDialogTheme </style> <style name="AlertDialogTheme" parent="Base.Theme.AppCompat.Light.Dialog.Alert"> @color/alert_background @color/alert_text @color/alert_text </style> Make it |
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> true @android:color/transparent #000000 @style/AlertDialogTheme </style> You are right, need to name the file |
@ShivamJoker
in AlertDialogTheme |
To have different colors for the title/body text vs the button we can use:
but we need to remove:
|
I did the same, but the problem is that the theme change is not happening on the fly. You need to reopen the dialog and only then it will open in the corresponding theme. |
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days. |
This issue was closed because the author hasn't provided the requested feedback after 7 days. |
Description
On IOS, when change to dark mode, alert dialog also changes to dark mode.
However on Android, alert dialog still stays white when change to dark mode.
I have tried on the latest version of android 10.
React Native version:
0.61.5
Steps To Reproduce
Call Alert.alert in android on dark mode.
Expected Results
Alert dialog color change to dark in dark mode.
The text was updated successfully, but these errors were encountered: