https://github.com/nostra13/Android-Universal-Image-LoaderListview是否提前回收?還是Universal ImageLoader取消了錯誤?或者是我的邏輯錯誤?
除了listview中的第一項外,它的工作性能很好,它的圖像加載任務已取消。
它說,它Is called when image loading task was cancelled because View for image was reused in newer task
但由於觀點顯然仍清晰可見,這一觀點不應該被回收尚未?我正在使用convertView。
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
if (getItemViewType(position) == HAS_IMAGE)
{
if (convertView == null)
{
convertView = li.inflate(R.layout.item_update_pic, null);
new UpdateWithImageWrapper(convertView, position); // this is where views are looked up and set
}
((UpdateWithImageWrapper) convertView.getTag()).setMyData(data.get(position), position); // this is where the correct data is set to the views and images are set to be loaded
}
else
{
if (convertView == null)
{
convertView = li.inflate(R.layout.item_update, null);
new UpdateNoImageWrapper(convertView, position);
}
((UpdateNoImageWrapper) convertView.getTag()).setMyData(data.get(position), position);
}
return convertView;
}
有沒有人有解決方案?
編輯:只是想補充說,它有我的所有列表視圖的問題。使用
ImageLoader的1.8.4
或許有辦法阻止如此迅速回收列表視圖?
Wiuld有興趣知道是否有辦法減慢回收,可能會添加某種緩衝區,因爲這可以解決問題。 – WIllJBD