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(…);
}
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/app/5998.html