An image loading and caching library for Android focused on smooth scrolling
cancelAll()
(047c22d77ebb497db29cf329c2388274ee413f20, thanks @paynemiller92)RequestManager#pause
when the thumbnail portion of a request is complete the full portion is still running (2f561534cd49171d0e372f1c613d1aa4ddcae36d)Downsampler
(#3673, ebdf8beb59df8d62c0a978ad967098dae8f666cf)CustomViewTarget
(c8d646ebf857a676a6b682b5e78d382c52b8c5ab)CustomViewTarget
are now ignored because they cause Glide to ignore calls to clear()
(c8d646ebf857a676a6b682b5e78d382c52b8c5ab)For example previously to apply centerCrop you'd have use a static method and apply()
:
Glide.with(fragment)
.load(url)
.apply(centerCropTransform())
.into(imageView);
Or use the generated API and the annotation processor:
GlideApp.with(fragment)
.load(url)
.centerCrop()
.into(imageView);
After this change, even without the generated API/annotation processor you can access standard RequestOptions methods directly:
Glide.with(fragment)
.load(url)
.centerCrop()
.into(imageView);
The generated API is still required for API extensions and to include integration libraries. Hopefully this makes it easier for users who do not include integration libraries and for developers of libraries that are currently unable to use the generated API to use Glide.
Target
s. onLoadCleared still must be implemented by subclasses of CustomTarget (b3b2d7a).transform()
method to replace the equivalent .transforms()
method (#2875, #3365, 8a26a6b8d93cc629d423a316b1838b841e672099, thanks to @aleien)ArrayList
s from other collections on some devices/versions of Android (#3296, 2ca790a).transforms()
, it's replaced with the identical .transform()
method (8a26a6b8d93cc629d423a316b1838b841e672099)RequestListener
s can be added to a single request (93289994a4ba59c6251aad0ccdf332c0d758d9c7, thanks to Adrian)onLoadCleared
and deprecated the unsafe versions. Failing to implement onLoadCleared in
a Target can lead to UIs displaying incorrect images, runtime exceptions, or various other resource re-use errors (3a7060777d17fa4d9ca2b68b019fd2d448f54ea6, thanks to azlatin@).SimpleTarget
and ViewTarget
, see the CustomViewTarget
description in Features in these release notes for more detail.PREFER_ARGB_8888_DISALLOW_HARDWARE
DecodeFormat
has been removed. Use RequestOptions#disallowHardwareConfig()
instead (7eb59f7f217adc7b0e017d586ea0814bf75c53d0)pause()
and isPaused()
from the internal Request
interface (9089752d2a4f4ccd6e7a6a7bbf7ea85db3f0949b)CustomViewTarget
) and therefore can no longer be released as a straight jar.VideoBitmapDecoder
(97d130d338349220cc8158141bbae1dfda496efe)VolleyStreamFetcher
(a690f38859ebf5f4f06172060596842a35cc16d8)TRIM_MEMORY_RUNNING_CRITICAL
(d939314e04b26709e7e890ba8f88494551111e23, thanks to @ygnessin)RequestManagers
to started when the containing Activity or Fragment is started (7d1898e92600a6a2698d72e12ec26c6715fb8fc5)_
in the package name (99723e3e7e14eecd908685da630d522e0e304b40, thanks to @TWiStErRob)GifDecoder
(7fb8b1258a3aabbedad3b8d15f59c8091498160a, thanks to @mtopolnik)DownsampleStrategy
(97d130d338349220cc8158141bbae1dfda496efe)RecyclerView
or ListView
preloader before the user scrolls for the first time (dd7fe186e0eb4ea2b17f8611317a2714b81ff03b, thanks to Anton111111)GlideBuilder.build
package private (914060e00a9a766017560276a2dd9a42dc9b2874)ComponentsCallbacks
from RequestManager
(1937b055db40557206cb7ea8499c37e43d9ec22f)NonNull
checks for Kotlin (a1f5f1008d4e9588ad37acd731d73bd63903440c, thanks fo @mariotaku)This is the January release of Glide.
DiskCacheStrategy.AUTOMATIC
(0917ef365ea35ca3e0f1eb12a2b7c843c84042f3, #2824)paulsowden@
)This is the December release of Glide.
Activity
or Fragment
to allow callers to manually reduce memory when their Fragment or Application is backgrounded (@kurtisnelson, 09e33a2133eb1d4005b227439c0c53c9c4e8c89b)RGBA_F16
Bitmap
s. Previously Glide supported decoding RGBA_F16
Bitmap
s, but would not re-use any stored in the BitmapPool
when doing so (cc0288c3b4bfb82a109a3f279af52c57fc5e1499)AssetFileDescriptor
s (6e9866b5a19d06625006a9a8c605db21047df74b)MediaMetadataRetriever#getScaledFrameAtTime
method added in OMR1 to marginally reduce memory usage when decoding video frames (ded8f77c9f2471e3c3413aa234656df8cf72dd2f)BitmapDrawable
s to byte[]
s (015d2659a9ea7438ab72b94500a0921f8ff35aa3)@TargetApi
annoatations (@SUPERCILEX, 67783961c71639871cc3687894976e6caeb6609e)@Nullable
and @NonNull
annotations to many of Glide's APIs (@SUPERCILEX, dc12b60c8f0a21eb9b3ab2164471c93d2e20ae25, c3dafde00a061bafcd43a739336ca3503af13a7d, 0cffd1da977e9ca334032ebc1d798213a177aab7, f541b65e596a49d252ba6b80d3b05a111ce93461, 36e0b802c3a1e564caf230b351a6438fa32100ac, 650bb7770d08b279c2a7f00e25337618da54f7f3, bd2f21595d3404e6aadf1f4333bef369509c4a56, e35a73b4e78f2f05dc5c1163b8083ac1b662b02f, f37ced1512f7eabf37f6c93b1b7ffb32c3629b72, bb96b633174184965cd1bdf9027ef3843f59c54f, 276d4ff4bdce85763c985c90a87ea5e858a1ffe4, c3107801dab8ccbe121157bee7dba29b7d9723e6, )skipMemoryCache(true)
would complete the load from the memory cache (#2663, 3dc1d18da75b44d8d97f4161fe0d330e4993e537)DefaultConnectivityMonitor
on some devices (c902730b75085cecdd40cd5817453d8af0eff4e9)StateVerifier
exception thrown when ResourceEncoder
implementations unexpectedly throw exceptions while writing resources to Glide's disk cache (6c7cf3f8cae998469a7e7df8c70c459311479a38)ResourceDrawableDecoder
fails to decode an image (d522ac7249ca1bf71f6de30e62d71a1faa8d4c4c)IllegalStateException
if a request using .error()
is cleared while the error request is running (#2767, 9c70aa5f92f523c6bac29628554fdde5428e0cdd)ClassCastException
s thrown by the Android framework on O (#2355, 642b2dc431e54cb677088e934743d78f1ad84810)LruBitmapPool
was asked to provide Bitmap
s with a null
config (c1036c1cdc3c85827bf566e104a12ca880e26411)aar
packaging in POMs, so @aar
should no longer be required to avoid warnings about jars depending on aars (06ba3442fd8d25c943e986c2bd6c138aa4b390e3)GlideBuilder
to manually enable it. Enabling active resource retention can lead to recycled Bitmap
errors or Bitmap
re-use bugs if applications call Bitmap.recycle()
on any images loaded by Glide or mutate the contents of Bitmap
s loaded by Glide.ActivityManager.isLowRam
set to true
(#2650, b221d4bbec138efcdb1aabd07600b7df713f9e40)Context
s in most of Glide's default Transformation
(23975d933bcda7d136340b9988f2bd575065b667, 733b2e0f25a6d3ddbb4942172e92a9fe01c87363, 9bedc2b5fe5b1b2e05203af173c73f0e599a0177, 55594baf791ccb49dd5cdc256662360717b409bb, d8f6224d127b984c3ac1356d44f62126e4843d07, d840533448fd7bde528e0af7ce10c49653430c12, 2f76842b8ef9ac15c43a2c5175f23496b5a13f37, 144ac5374eb0bd11a8f8e92d7346dafac1426621, 150ebabbd7d5e8751c8678fa01418d1b1f1259da, 92d761d002da25320f2c504267f56d73b889b2d4, a6f1b1c1bef5b4e8be736c564792715266b07463)@NonNull
and @Nullable
annotations added in this release may break builds that depend on compiler plugins that do static nullability analysis, typically due a lack of annotations on any implemenations you might have of Glide's interfaces.VideoBitmapDecoder
, use VideoDecoder
instead.