glide
glide copied to clipboard
fixed placeholders load drawable resources with wrong context
…t mode
Description
issues #3778 #3751
fix unable to find night resources when using night mode
Motivation and Context
when using 'AppCompatDelegate.seDefaultNightMode' change theme mode, glide will not use the right resources.
in ContextThemeWrapper if mOverrideConfiguration is null it will get resource by 'mBase.getResources()', in 'DrawableDecoderCompat' mBase is applicationContext, should use 'applyOverrideConfiguration' to get resource from current theme.
ResourcesCompat.getDrawable() resource should use 'theme.getResources' rather than 'context.getResources' because context is applicationContext
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
@sjudd this commit is necessary for us. would you release a version?
Thank you for the fix! Would you be willing to add a test case for this?
What about merging this branch with the main? The whole library is unusable for us using the dark mode