Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Migrate AsyncDialogs to Material 3 #16515

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

neeldoshii
Copy link
Contributor

@neeldoshii neeldoshii commented May 31, 2024

Description

Currently the issue was that the colour of the checkbox was not matching with the APP theme @color/material_light_blue_500. Initially, my thought process was to add a style in the Theme to ensure the checkbox color matches the app theme. However, I later realized that migrating to Material3 would be a better approach, as it allows the checkbox color to adapt dynamically based on the app theme. Since we plan to migrate to Material3 eventually, this seems like the most forward-thinking solution.

Fixes

Steps to Reproduce

  1. App Info
  2. Go to Manage Space
  3. Click on Delete backups
  4. Click on any one of the Checkbox Item

Screenshot/Video

asyndialog.mp4

Approach

In the PR :)

Learning (optional, can help others)

https://github.com/material-components/material-components-android/blob/master/docs/components/Dialog.md

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Fixed : Change color of Checkbox in AlertDialog in AsyncDialogs.kt ankidroid#15174
Migrated AlertDialog of AsyncDialog to Material3 (MaterialAlertDialog) Related ankidroid#13878

Co-Authored-By: Sanjay Sargam <sargamsanjaykumar@gmail.com>
Co-Authored-By: Thejas Elandassery <58774753+thejas775@users.noreply.github.com>
@neeldoshii

This comment was marked as outdated.

@BrayanDSO BrayanDSO marked this pull request as draft June 2, 2024 10:52
@BrayanDSO
Copy link
Member

Seems like incomplete

@neeldoshii
Copy link
Contributor Author

Created Styling to support for both API Level

Android 13 Android 8 (API 26)
screenshot screenshot
screenshot screenshot
screenshot screenshot
screenshot screenshot

The above screenshots is of Delete Restore Backups following black,dark,plain, light theme

Android 13 (Plain, Light, Dark, Black)

Delete Collection Delete Everything
screenshot screenshot
screenshot screenshot
screenshot screenshot
screenshot screenshot

Android 8 (API 26) (Plain, Light, Dark, Black)

Delete Collection Delete Everything
screenshot screenshot
screenshot screenshot
screenshot screenshot
screenshot screenshot

@@ -105,6 +105,9 @@
<!-- AlertDialogTheme-->
<item name="alertDialogTheme">@style/AlertDialogStyle</item>

<!-- MaterialAlertDialog-->
<item name="materialAlertDialogPrimaryColor">@color/theme_black_primary_dark</item>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still confused how is this taking light grey color in the dialog where here I have passed <color name="theme_black_primary_dark">#000000</color>. Not sure why its not overriding leading both theme_black and theme_dark somehow both of the theme has same color.

PS : This is my first time working into theming.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Change color of Checkbox in AlertDialog
2 participants