listView添加多个不同的adapter(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:21 点击:次
return(typeOffset+section.adapter.getItemViewType(position-1));
}
position-=size;
typeOffset+=section.adapter.getViewTypeCount();
}
return(-1);
}
public boolean areAllItemsSelectable() {
return(false);
}
public boolean isEnabled(int position) {
return(getItemViewType(position)!=TYPE_SECTION_HEADER);
}
@Override
public View getView(int position, View convertView,
ViewGroup parent) {
int sectionIndex=0;
for (Section section : this.sections) {
if (position==0) {
return(getHeaderView(section.caption, sectionIndex,convertView, parent));
}
int size=section.adapter.getCount()+1;
if (position<size) {
return(section.adapter.getView(position-1, convertView,parent));
}
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>