Picasso 是 Android 上一个强大的图片下载和缓存库。
示例代码:
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView); @Override public void getView(int position, View convertView, ViewGroup parent) { SquaredImageView view = (SquaredImageView) convertView; if (view == null) { view = new SquaredImageView(context); } String url = getItem(position); Picasso.with(context).load(url).into(view); } //图像处理 Picasso.with(context) .load(url) .resize(50, 50) .centerCrop() .into(imageView)