public SectionAdapter(int layoutResId, int sectionHeadResId, List data) {
super(layoutResId, sectionHeadResId, data);
}
@Override
protected void convert(BaseViewHolder helper, MySection item) {
helper.setImageUrl(R.id.iv, (String) item.t);
}
@Override
protected void convertHead(BaseViewHolder helper,final MySection item) {
helper.setText(R.id.header, item.header);
helper.setOnClickListener(R.id.more, new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(context,item.header+“more…”,Toast.LENGTH_LONG).show();
}
});
}
实体类的公有抽象父类SectionEntity
public abstract class SectionEntity implements Serializable {
/**
- 是否是分组header
*/
public boolean isHeader;
/**
- 包装的实体类,可以没有
*/

最低0.47元/天 解锁文章

1776

被折叠的 条评论
为什么被折叠?



