-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: fix dialog button colors in dark mode #15091
Android: fix dialog button colors in dark mode #15091
Conversation
Hey there @webwarrior-ws! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Added tests for checking brightness of AlertDialog button text to make sure that in dark mode the text is bright (background is dark) and in light mode text is dark (background is light). |
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
public partial class AlertDialogTests: ControlsHandlerTestBase | ||
{ | ||
|
||
async Task<Color> GetDialogButtonTextColor(int nightMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test!
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Add simple styles.xml to workaround the maui styling bug in dark theme [1]. Should be removed after merging [2]. [1] dotnet/maui#15088 [2] dotnet/maui#15091
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
Azure Pipelines successfully started running 2 pipeline(s). |
@webwarrior-ws can you rebase or merge this PR with main please? I'm hoping that'll fix the failing tests. I tried, but it looks like I don't have permission to update your branch. |
Hi @webwarrior-ws. We have added the "s/pr-needs-author-input" label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time. |
Fix alert dialog button colors in dark mode. Use ?attr/colorOnSurface for text color in dialogs. This ensures contrasting color for both dark and light modes.
Use AppCompat version of AlertDialog in picker. This ensures consistent styling between picker dialog and alert dialog.
Add tests for checking brightness of AlertDialog button text. Co-authored-by: webwarrior <reg@webwarrior.ws>
1c40bc7
to
d66a27e
Compare
Rebased on main. |
Azure Pipelines successfully started running 2 pipeline(s). |
Hi. any idea when this will be available in a public release? I have the same issue with dialogs |
Still experiencing this |
Description
Fix alert dialog button colors in dark mode.
Use ?attr/colorOnSurface for text color in dialogs.
This ensures contrasting color for both dark and light modes.
Use AppCompat version of AlertDialog in picker.
This ensures consistent styling between picker dialog and
alert dialog.
Fixes
Fixes #15088
Screenshots
Now dialogs with default Android theme look like this: