Hi
soon with Android Q the night mode will be very important in my opinion and it would be nice if you can fix this little problem. Glide does not find pictures in the following directories:
drawable-night
drawable-night-hdpi (also mdpi, xhdpi, xxhdpi and xxxhdpi)
Greets
Frank
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
@frankyxcs Try using:
Glide.with(this)
.load(ContextCompat.getDrawable(context, R.drawable.some_drawble))
instead of
Glide.with(this)
.load(R.drawable.some_drawable)
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I'm having the same problem. If I use michaelbukachi's workaround it works fine for me.
Also, if I explicitly setting a different key for my Drawable doesn't work.
boolean isNightModeEnabled = ...
String key = (isNightModeEnabled ? "night" : "notnight") + drawableResourceId;
Glide.with(context).load(drawableResourceId).signature(new ObjectKey(key)).into(imageView);
Neither did explicitly setting the theme:
Glide.with(context).load(drawableResourceId).theme(context.getTheme()).into(imageView);
Most helpful comment
@frankyxcs Try using:
instead of