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


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,837评论 2 45
  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 13,640评论 5 6
  • 它在初冬萧瑟的寒风中兀自立着,不知过了几时几载。 冻得发黑,却又倔强的闪动着绿光的叶子随风瑟瑟,没有被吹落。...
    一年又一年阅读 447评论 0 1
  • 90后,小朋友毫无疑问都开始叫叔叔阿姨了! 身边大多是这个年龄段的朋友,而我们已经开始为生活的循序渐进而胆战心惊。...
    JM立夏阅读 2,221评论 5 2
  • 我是个近视眼,因为某种眼疾,打从六岁起我就开始朦朦胧胧的看这个世界。作为孩子,其实是很讨厌戴眼镜的,为了能够蹦...
    微尘亦有心阅读 448评论 0 0

友情链接更多精彩内容