glide v4.3.0 Release Notes

Release Date: 2017-10-31 // over 6 years ago
  • ๐Ÿš€ This is the October release of Glide.

    ๐Ÿ”‹ Features

    • โž• Added a DiskLruCacheFactory implementation that falls back to the internal cache directory on devices where the external cache directory isn't available (#24, 56a4275, thanks to @ANPez)
    • โž• Added an error API to start a new load if the primary load fails.
      ๐Ÿ‘€ See the docs page for usage. (b06b0cc),
    • โž• Added support for decoding non-Bitmap Drawables and for transforming most of those types of Drawables. Animated Drawables may be loaded if they're supported by the framework or support library, but can't be transformed. Consider using optionalTransform if you want to try to transform non-Bitmap resources but don't want your loads to fail if transformations can't be applied. (#350, a0628b8, 7614e10, fc4a456, 90f1cc9)
    • โž• Added a helper method to avoid nesting when applying multiple levels of thumbnails (bc1b25e)
    • 0๏ธโƒฃ Pass the Context provided to Glide.with() (either the actual Context or the Context of the given Fragment or Activity) into Glide's requests. As a result, Glide will use the Theme of the provided Context automatically. Callers can override the default Theme with the theme() option (#1267, bbb25af).
    • ๐Ÿ‘ป Pass through exception messages to RequestFutureTarget.
      ๐Ÿ‘€ Previously all load failures would throw an ExecutionException with a more or less useless generic error message and stack trace. Now the ExceptionMessage will contain the same failure message that you see logged with the Glide log tag. (65048a4)
    • โž• Added support for passing Bitmaps and Drawables into .load() (7663c21)

    ๐Ÿ› Bugs

    • โž• Added @CheckResult to most intermediate builder methods in Glide's various builder classes to avoid errors where developers ignore the results and end up ignoring the options they'd tried to apply (739cb35, 28e461e, thanks to @TWiStErRob)
    • Avoid a concurrency bug in the platform on more varieties of Moto Xs (1e2fb23)
    • ๐Ÿ›  Fixed an integer overflow when upscaling images in Downsampler (#2459, c7383b2)
    • ๐Ÿ›  Fixed a couple of import style nits (6cd8289, thanks to @brettchabot)
    • โž• Added a separate executor to decode GIF frames on to avoid stuttering when scrolling through lists of GIFs that was caused by Glide's normal threads being blocked by I/O or decoding GIF headers (#899, c4db04e).
    • ๐Ÿ›  Fixed corrupt images caused by the RoundedCorners transformation (#2472, 0b5d1bc).
    • โœ‚ Removed an inaccurate Precondition that obfuscated the reasons for load failures (#2462, 890454a)
    • Avoid failing requests for Files types that can't be mmaped (cbe9f42, thanks to @pkorth).
    • ๐Ÿ›  Fixed a crash performing network operations when using a GlideExecutor with a custom UncaughtExceptionHandler (#2508, e6e2aef, thanks to @stephanenicolas)
    • ๐Ÿ›  Fixed Glide's Futures from blocking forever if the Request or a custom component throws an unexpected exception (74fcad1)
    • Avoid showing incorrect frames when pausing/restarting GIFs (#2526, 90b3b9f)

    ๐Ÿ— Build

    • ๐Ÿ›  Fixed a bunch of warnings and compile time noise and cleaned up a variety of build files and versions (#2426, thanks to @TWiStErRob)
    • ๐Ÿ›  Fixed duplicate class files in the compiler jar (#2452m, 7c09fc1)

    Behavior Changes

    • Include the presence or absence (but not equality of) RequestListeners when determining whether or not to ignore new Requests as part of an ongoing effort to avoid unnecessary restarts of in progress loads (#2270, 95caa05).
    • Default GIFs to using ARGB_8888 instead of RGB_565 and add an API to specify the preferred format for GIFs specifically. As a result both GIF quality and memory usage will increase. For details on configuring the format, see the javadocs (#2396, 6f91031).

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ‘ป GlideExceptions getRootCauses() method will now return a List of Throwable instead of Exception. Doing so allows us to better handle certain expected Errors, like OutOfMemoryException that otherwise have to be caught by our Executor and swallowed. This change was made as part of avoiding behavior in Glide's Futures that could cause them to block forever (74fcad1).