-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
fixed placeholders load drawable resources with wrong context #4842
fixed placeholders load drawable resources with wrong context #4842
Conversation
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 |
Previously we'd use the application Context, which would not use the Activity theme. That would in turn mean we would not customize Drawables for light / dark mode. I've also added a bunch of emulator tests. It turns out these changes aren't quite sufficient, even with bumptech#4842, to get asynchronous loading of resources passed to load() working. I've left a pretty extensive comment in the new test along with ignored tests about what additional changes we'd need. Progress towards bumptech#3751.
Previously we'd use the application Context, which would not use the Activity theme. That would in turn mean we would not customize Drawables for light / dark mode. I've also added a bunch of emulator tests. It turns out these changes aren't quite sufficient, even with bumptech#4842, to get asynchronous loading of resources passed to load() working. I've left a pretty extensive comment in the new test along with ignored tests about what additional changes we'd need. Progress towards bumptech#3751.
Previously we'd use the application Context, which would not use the Activity theme. That would in turn mean we would not customize Drawables for light / dark mode. I've also added a bunch of emulator tests. It turns out these changes aren't quite sufficient, even with bumptech#4842, to get asynchronous loading of resources passed to load() working. I've left a pretty extensive comment in the new test along with ignored tests about what additional changes we'd need. Progress towards bumptech#3751.
…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