使用picasso加载图片

1.添加依赖:compile 'com.squareup.picasso:picasso:2.5.2'


2.加载图片:
用到的参数包含(上下文; 图片数据 ;自定义图片大小; 加载默认图片;控件对象 )
Picasso.with(MainActivity.this).load("http://img5.cache.netease.com/photo/0005/2017-04-19/900x600_CICCQTB00BV0005.jpg").resize(500,500).error(R.mipmap.ic_launcher).into(img);
posted @ 2017-04-24 20:07  内涵馒头  阅读(245)  评论(0)    收藏  举报