Android开发从放弃到捡起之Glide

首先先上地址:

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.


简单的说就是快速轻松的加载图片,Picasso的功能他都有,甚至方法结构都差不多

下面是导入AndroidSudio方式


Gradle还是很方便的,我们在Module的build.gradle中加入

v4包也要导入

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对比下咯,我们来看看效果


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容