把holder抽取成一个接口会不会更方便?
把holder抽取成一个接口会不会更方便?
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(convertView==null){
convertView = mInflater.inflate(mLayoutId, parent,false);
mHolder.getFieldViews(convertView);
convertView.setTag(mHolder);
}else{
mHolder = (IViewHolder) convertView.getTag();
}
Bean bean = mBeans.get(position);
mHolder.setFieldValues(bean);;
return convertView;
}
求指教?