Glide 4.1.0
This is the August release of Glide.
Bug fixes
- Fixed a bug where options applied in
GlideExtensions
could be ignored if the extension option was applied to aRequestOptions
object that hadautoClone()
enabled (b39a9db) - Fixed an issue default options set in
RequestManager
could be ignored ifautoClone()
was enabled (d717e83) - Fixed double logging parts of GlideExceptions (9d7b8d9)
- Fixed a bug where
DiskCacheStrategy.ALL
andDiskCachceStrategy.RESOURCE
when used while loading a GIF might lead to a partial or invalid cache file (1594655) - Fixed a concurrent modification exception in
ViewTarget
(cac7192) - Fixed an error attempting to load files more than
Integer.MAX_VALUE
in length (#2240, 8fac123) - Fixed an issue with using cross fades in RecyclerView (06aced3).
- Clarified nullability of properties in
DataFetcher
(#2203, thanks to @Tolriq)
Features
- Removed the BitmapPool by default from low ram devices on O+ and decreased the default BitmapPool size on O+ (bb5c391)
- Added support for
Bitmap.Config.HARDWARE
in Android O+.
See note below for behavior changes. (d83de42) - Expose the entry count to subclasses of
LruCache
(a2a695f, thanks to @loran) - Target Android API 26 (cea1cce)
- Added support for loading a contact thumbnail by phone number (#2233, thanks to @dstefanox)
- Added a method to
GlideBuilder
so users can set defaultTransitions
(#2182, 0b99260) - Added a method to set network timeouts for Glide's default networking library (3e5527e)
- Automatically register Glide for
ComponentCallbacks
andComponentCallbacks2
so applications no longer have to do so manually (6b137c2) - Avoid restarting in progress or completed requests if the new request is identical to the old one (9d10097, 73a8e01, 0a44cf6, thanks to @Tolriq)
- Added a new shortcut method for applying multiple transformations (#2138, thanks to @realdeadfish)
Build changes
- Updated to Gradle 4.1 (0310656, thanks to @jaredsburrows)
API/Behavior changes:
- After 9d10097, if you attempt to start a request that is exactly the same as the request already in progress for a given
View
orTarget
, your new request will be ignored and the old request will be allowed to complete. If you need to override this behavior, you can do so by manually callingclear()
on theView
orTarget
before starting your new load. Consider filing an issue if you encounter a problem with this feature. - After 06aced3, Glide will always use a
TransitionDrawable
to run the cross fade transition. Previously cross fade would use aViewAnimation
for the first image in a request to complete and only useTransitionDrawables
for animating from thumbnails to full images. RecyclerView does not handleViewAnimations
run outside of its item animator so we've removed the use ofViewAnimation
. As a result, if you use views likeCircularImageView
that can't handle animatedDrawables
, you may see a change in behavior. Consider using aViewAnimation
basedTransition
instead of a cross fade if you're not loading in aRecyclerView
or file a new issue if you encounter a situation where neither cross fade nor aViewAnimation
will work. - After d83de42, setting
DecodeFormat.ARGB_8888
orDecodeFormat.RGB_565
will cause Glide to attempt to decode Bitmaps usingBitmap.Config.HARDWARE
. Hardware Bitmaps are more memory efficient, but can't be drawn in software and don't expose their pixels so methods likegetPixel()
will throw an exception, as will attempting to draw a hardware bitmap to aCanvas
. You can avoid using Hardware Bitmaps for an individual request by callingRequestOptions#disallowHardwareConfig
. You can also disallow hardware configurations for your entire application by passing inRequestOptions
intoGlideBuilder
in yourAppGlideModule
.