什么是 Retrofit ? Retrofit是Square开发的一个Android和Java的REST客户端库。这个库非常简单并且具有很多特性,相比其他的网络库,更容易让初学者快速掌握。它可以处理GET、POST、PUT、DELETE…等请求,还可以使用picasso加载图片。 常用注解 Retr ...
分类:
移动开发 时间:
2019-02-03 10:44:45
阅读次数:
170
1.添加依赖:compile 'com.squareup.picasso:picasso:2.5.2' 2.加载图片: 用到的参数包含(上下文; 图片数据 ;自定义图片大小; 加载默认图片;控件对象 ) Picasso.with(MainActivity.this).load("http://img ...
分类:
其他好文 时间:
2017-04-24 21:22:32
阅读次数:
171
Picasso 加载图片到ImageView 或者自己的自定义View都是可以直接调用对应API的,但是用into(0直接也加载到RelatieLayout就不好使了,可以这样来: Picasso.with(getActivity()).load(R.drawable.mine_top_bg).i....
分类:
其他好文 时间:
2016-01-12 19:34:37
阅读次数:
161
现在Android开源库中有许多图片加载框架,本文以picasso为例,总结下开发过程中的一些内存优化经验,可以有效避免oom...
分类:
其他好文 时间:
2015-08-26 17:58:04
阅读次数:
217
Picasso.with(context)
// .load(goods.get(position).getGoods_url())
// .tag(context)
// .into(viewHolder.goodsImage);
Glide.with(context)...
分类:
其他好文 时间:
2015-04-23 17:41:19
阅读次数:
253