listView添加多个不同的adapter(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:21 点击:次
position-=size;
}
return(null);
}
public int getCount() {
int total=0;
for (Section section : this.sections) {
total+=section.adapter.getCount()+1; // add one for header
}
return(total);
}
public int getViewTypeCount() {
int total=1; // one for the header, plus those from sections
for (Section section : this.sections) {
total+=section.adapter.getViewTypeCount();
}
return(total);
}
public int getItemViewType(int position) {
int typeOffset=TYPE_SECTION_HEADER+1; // start counting from here
for (Section section : this.sections) {
if (position==0) {
return(TYPE_SECTION_HEADER);
}
int size=section.adapter.getCount()+1;
if (position<size) {
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>