Picasso 图片加载库
Picasso 英文意思国外一个很有名的画家毕加索的名字,国外项目取名还是很有意思的!
从github新下载的picasso项目有依赖其他第三方开源项目okhttp和okio,这两个项目也是相当经典的,据说okhttp里网络请求的代码处理逻辑已经加入到android4点几的源码中了。
picasso也提供了封装好了的jar包可以使用,这样就不需要导入okhttp和okio项目了,但是看jar包里的OkHttpDownloader这个类还是引用了okhttp里的对象,可是在jar包里并没找到,不知道为什么~谁能解释下啊?
Picasso使用的方法汇总:
然后呢,Picasso还提供了debug的标示,调用picasso的setIndicatorsEnabled方法,true是debug模式,跟踪代码其实就是在最后生成的PicassoDrawable类的ondraw里绘制了个左上角小三角,根据
public enum LoadedFrom {
MEMORY(Color.GREEN),
DISK(Color.BLUE),
NETWORK(Color.RED);
枚举里的不同值标示不同加载来源,这对分析图片加载有好处。
另外链接个分析picasso源码不错的博客地址http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/0731/1639.html
不要感谢我哦!
Picasso真心是个很强大的图片加载框架,之前用过universal-Image-Loader图片加载框架也挺不错的
开源的力量很强大啊☻
原文链接:http://blog.csdn.net/fancylovejava/article/details/43760119
最新文章
- java复杂枚举
- VIJOS P1037搭建双塔[DP]
- NYOJ题目611练练
- 如何查看 oracle 官方文档
- Eigenvectors and eigenvalues
- PAT 解题报告 1048. Find Coins (25)
- .net平台的RSA实现以及与Delphi之间的互操作性
- Java文件File操作一:文件的创建和删除
- 不用预计算切向空间的Normal mapping
- java 自动装箱、自动拆箱
- Ubuntu Gnome下如何改动应用的图标icon
- 在VirtualBox 虚拟机中安装CentOS7 64位实验基础系统
- 读Kafka Consumer源码
- RandomAccess接口的使用
- springmvc+mybatis+mysql 数据库插入中文是乱码
- 如何提升JavaScript的任务效率?学会后教给你同事
- How to install Niresh Mavericks on PC
- APPicon的生成
- Wireshark win7 没有找到接口;找不到接口
- js实现页面锚点定位动画滚动
热门文章
- [系统运维]Supervisord安装和启动程序
- 【Netty源码学习】DefaultChannelPipeline(三)
- iOS集合视图单元格高亮和选中的区别
- 详解EBS接口开发之库存事务处理采购接收--补充
- 应付模块的R12 TRACE 和 FND Debug 文件 / FND 日志 调试
- 剑指Offer--排序算法小结
- SSH深度历险(九) Struts2+DWZ+Uploadify实现多文件(文件和图片等等)上传
- RMI方式Ehcache集群的源码分析
- JAVA之旅(二十六)——装饰设计模式,继承和装饰的区别,LineNumberReader,自定义LineNumberReader,字节流读取操作,I/O复制图片
- Dynamics CRM2011/2013 删除个人视图