在回收视图中,有时会显示重复的图像。什么是显示重复image.Not的原因,所有的时间有时它occure在Android的回收视图中显示重复的图像
public void onBindViewHolder(ViewHolder holder, int position) {
holder.tvSubject.setText(chatSessions.get(position).getName());
holder.tvMessage.setText(chatSessions.get(position).getLastUnreadMsg());
holder.tvTime.setText(chatSessions.get(position).getTime());
final String pictureLink = ServerRequestHandler.getPictureLink(chatSessions.get(position).getCsToken());
Log.d("ChatListAdapter", position + ", pictureLink= " + pictureLink);
Log.d("ChatListAdapter", chatSessions.get(position).getName() + ", Time= " + chatSessions.get(position).getTime());
holder.profileLoadingView.setVisibility(View.GONE);
holder.profilePicture.setVisibility(View.VISIBLE);
holder.profilePicture.setImageDrawable(null);
if (TaskUtils.isNotEmpty(pictureLink)) {
imageLoader.displayImage((MainPageActivity) context, pictureLink, holder.profilePicture, holder.profileLoadingView);
} else {
// imageLoader.displayImage(null, holder.profilePicture, holder.profileLoadingView);
// holder.profilePicture.setImageDrawable(context.getResources().getDrawable(R.drawable.photo));
holder.profilePicture.setImageDrawable(null);
}
我已经加入了screenn拍摄 enter image description here
在这里发布你的屏幕截图 –
pictureLink链接到不同的图像? – Christopher
它由于图像加载器库,它缓存图像快速加载 –