0
我有一個項目列表視圖。當我滾動時,圖像隨機出現。 我不知道爲什麼...... 有適配器:ListView圖像隨機
package com.forel.dbc;
[...]
public class AgendaAdapter extends BaseAdapter {
private List<Data> items; //Le contenu
private LayoutInflater inflater;
private Context context;
private SmartImageView myImage;
public AgendaAdapter(Context context, List<Data> items, DownloaderImageViewCache imageCache, boolean invertTextColor) {
this.items = items;
this.context = context;
this.imageCache = imageCache;
inflater = (LayoutInflater)this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
[...]
public View getView(int position, View convertView, ViewGroup parent) {
if(convertView == null) {
convertView = inflater.inflate(R.layout.agenda_list_item, parent, false);
}
final Data event = (Data) getItem(position);
if (event.getTitle() != null)
((TextView) convertView.findViewById(R.id.eventName)).setText(event.getTitle());
if (event.getDesc() != null)
((TextView) convertView.findViewById(R.id.desc)).setText(event.getDesc());
((SmartImageView) convertView.findViewById(R.id.my_image)).setImageUrl(event.getPicture()); // getPicture return imageUrl,
return convertView;
}}
的圖像隨機出現在列表中
如果有人有一個想法......
謝謝!
這聽起來像是SmartImageView庫的問題。 – dmon