Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. Glide includes a flexible API that allows developers to plug in to almost any network stack. By default Glide uses a custom HttpUrlConnection based stack, but also includes utility libraries plug in to Google's Volley project or Square's OkHttp library instead.
Glide's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is also effective for almost any case where you need to fetch, resize, and display a remote image.
mavenCentral() // jcenter() works as well because it pulls from Maven Central
Android SDK: Glide requires a minimum API level of 10.
OkHttp 2.x: there are optional dependencies available called okhttp-integration, see Integration Libraries wiki page.
OkHttp 3.x: there are optional dependencies available called okhttp3-integration, see Integration Libraries wiki page.
Volley: there are optional dependencies available called volley-integration, see Integration Libraries wiki page.
Round Pictures: CircleImageView/CircularImageView/RoundedImageView are known to have issues withTransitionDrawable (.crossFade() with .thumbnail() or .placeholder()) and animated GIFs, use aBitmapTransformation (.circleCrop() will be available in v4) or .dontAnimate() to fix the issue.
Huge Images (maps, comic strips): Glide can load huge images by downsampling them, but does not support zooming and panning ImageViews as they require special resource optimizations (such as tiling) to work withoutOutOfMemoryErrors.
Building Glide with gradle is fairly straight forward:
git clone firstname.lastname@example.org:bumptech/glide.git # use https://github.com/bumptech/glide.git if "Permission Denied"cd glide
git submodule init && git submodule update
Note: Make sure your Android SDK has the Android Support Repository installed, and that your $ANDROID_HOME environment variable is pointing at the SDK or add a local.properties file in the root project with a sdk.dir=... line.
Follow the steps in the Build section to setup the project and then:
Follow the steps in the Build section to setup the project and then edit the files however you wish. Intellij IDEA 14 cleanly imports both Glide's source and tests and is the recommended way to work with Glide.