首先先上地址:
https://github.com/bumptech/glide
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 customHttpUrlConnectionbased 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.
簡(jiǎn)單的說就是快速輕松的加載圖片,Picasso的功能他都有,甚至方法結(jié)構(gòu)都差不多
下面是導(dǎo)入AndroidSudio方式
Gradle還是很方便的巨柒,我們?cè)贛odule的build.gradle中加入
v4包也要導(dǎo)入
Picasso.with(this).load(API.IMAGE_URI).into(ivPicasso);
Glide.with(this).load(API.IMAGE_URI).into(ivGlide);
Glide.with(this).load(API.GIF_URI).into(ivGlideGif);
順便和Picasso對(duì)比下咯汤求,我們來看看效果