Android ListView复杂多功能详解
2012-09-18 09:28:02 来源:WEB开发网核心提示:else {holder = (ViewHolder) convertView.getTag();}Map<String, Object> item = this.datas.get(position);holder.itemRightImage1.setImageResource(Integer.pars
else {
holder = (ViewHolder) convertView
.getTag();
}
Map<String, Object> item = this.datas
.get(position);
holder.itemRightImage1
.setImageResource(Integer
.parseInt(item
.get("right1")
.toString()));
holder.itemText
.setText(item.get(
"text")
.toString());
holder.itemRightImage
.setImageResource(Integer
.parseInt(item
.get("right")
.toString()));
return convertView;
}
static class ViewHolder {
ImageView itemRightImage1;
TextView itemText;
ImageView itemRightImage;
}
}
holder = (ViewHolder) convertView
.getTag();
}
Map<String, Object> item = this.datas
.get(position);
holder.itemRightImage1
.setImageResource(Integer
.parseInt(item
.get("right1")
.toString()));
holder.itemText
.setText(item.get(
"text")
.toString());
holder.itemRightImage
.setImageResource(Integer
.parseInt(item
.get("right")
.toString()));
return convertView;
}
static class ViewHolder {
ImageView itemRightImage1;
TextView itemText;
ImageView itemRightImage;
}
}
更多精彩
赞助商链接