标签:
List<T> : ListView -> Adapter extends BaseAdapter -> ViewHolder
ViewHolder
CommonAdaper
通用的ViewHolder类
convertView.setTag(holder);
ViewHolder:Item各种控件的引用
Map<int, View> -> SpareArray
getView(int id);
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = ...
TextView tv = holder.getView(viewId);
tv.setText(...);
}
Android——打造万能适配器(CommonAdapter)
标签:
原文地址:http://www.cnblogs.com/jesonjason/p/5495674.html