美文网首页
Android开发从放弃到捡起之Glide

Android开发从放弃到捡起之Glide

作者: 一个人开到荼蘼 | 来源:发表于2016-06-08 17:44 被阅读72次

首先先上地址:

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

相关文章

网友评论

      本文标题:Android开发从放弃到捡起之Glide

      本文链接:https://www.haomeiwen.com/subject/baujdttx.html