80,471
社区成员




int type = getItemViewType(position);
if (convertView == null) {
holder = new viewHolder();
switch (type) {
case TYPE_1:
convertView = View.inflate(getApplicationContext(), R.layout.item_1, null);
holder.checkBox = (CheckBox) convertView.findViewById(R.id.cb);
holder.textView = (TextView) convertView.findViewById(R.id.tv_1);
break;
case TYPE_2:
convertView = View.inflate(getApplicationContext(), R.layout.item_2, null);
holder.textView = (TextView) convertView.findViewById(R.id.tv_2);
break;
case TYPE_3:
convertView = View.inflate(getApplicationContext(), R.layout.item_3, null);
holder.textView = (TextView) convertView.findViewById(R.id.tv_3);
holder.imageView = (ImageView) convertView.findViewById(R.id.iv_3);
break;
default:
break;
}