ViewHoder优化:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
if (convertView == null) {
convertView = View.inflate(getActivity(), R.layout.lv_item,
null);
viewHolder = new ViewHolder();
convertView.setTag(viewHolder);
viewHolder.lv_imageView = (ImageView) convertView
.findViewById(R.id.lv_imageView);
viewHolder.lv_textView = (TextView) convertView
.findViewById(R.id.lv_textView);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
viewHolder.lv_textView.setText(list.get(position).title);