Closed LayneCui closed 7 years ago
你在adapter里面绑定了child的id吗?
好像没有,我照着 demo 写的,我没见到 demo 里绑定 id 的代码呢
public BusinessListAdapter(int layoutResId, int sectionHeadResId, List
@Override
protected void convertHead(BaseViewHolder helper, BusinessListSection item) {
helper.setText(R.id.head,item.header);
}
@Override
protected void convert(BaseViewHolder helper, BusinessListSection item) {
BusinessListBean.CBusinessCodeVosBean bean = item.t;
helper.setText(R.id.cbx_item_topic,bean.getBusName());
}
请查看文档 http://www.jianshu.com/p/b343fcff51b0 你看的adapter没有绑定,查相关ItemClickAdapter则有。
好的,谢谢大哥
List bean = baseBean.getData();
mRecyclerView.setLayoutManager(new GridLayoutManager(context,4));
datas = dataProcess(bean);
BusinessListAdapter sectionAdapter = new BusinessListAdapter(R.layout.item_x2_topic,
R.layout.item_bussines_paarent_section,datas);
mRecyclerView.setAdapter(sectionAdapter);