我使用下面的代码通过列表视图中的picasso加载图像
ListAdapter adapter = new SimpleAdapter(
tampil_semua_laporan.this, list, R.layout.list_item,
new String[]{konfigurasi.TAG_TANGGAL,konfigurasi.TAG_JUDUL,konfigurasi.TAG_DESKRIPSI},
new int[]{R.id.tanggal, R.id.judul, R.id.deskripsi});
listView.setAdapter(adapter);
请帮助和谢谢
试试这个在毕加索加载图像
Picasso.with(mContext).load(Your_image).into(Your_imageView);
将picasso设置为simpleAdapter的getView方法。如下 -
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
// set here
Picasso.with(mContext)
.load(image[position]) //set your image id position here
.transform(new RoundedCornersTransform())
.placeholder(R.drawable.placeholder)
.into(Imageview);
return convertView;
}