使用picasso将图像从数据库加载到recyclerview

时间:2017-03-14 06:02:37

标签: android

我有保存在我的本地数据库中的图像我希望在我的recylerview中显示它们但是如果我将这些图像直接添加到我的bindholder recyclelerview中的imageview,则会出现滞后现象。所以阅读一篇文章来使用picasso.But面临一个问题,图像没有被加载到imageview中。这是我的代码

String thumb = userData.getPhotoThumb();
if (!StringUtils.isNullOrEmpty(thumb)) {  Picasso.with(mContext).load(thumb).into(viewHolder.chatsListItemBinding.ivContactImage);}

1 个答案:

答案 0 :(得分:1)

使用stackTrace

加载图片时尝试打印exception的{​​{1}}
Picasso

我相信你会弄明白,你的代码出了什么问题。

了解更多信息Picasso Official