use of com.chad.baserecyclerviewadapterhelper.adapter.node.section.NodeSectionAdapter in project BaseRecyclerViewAdapterHelper by CymChad.
the class NodeSectionUseActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_node_section);
setBackBtn();
setTitle("Node Use (Section)");
mRecyclerView = findViewById(R.id.rv_list);
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));
// mRecyclerView.addItemDecoration(new GridSectionAverageGapItemDecoration(10, 10, 20, 15));
final NodeSectionAdapter nodeAdapter = new NodeSectionAdapter();
// 顶部header
View view = getLayoutInflater().inflate(R.layout.head_view, mRecyclerView, false);
view.findViewById(R.id.iv).setVisibility(View.GONE);
nodeAdapter.addHeaderView(view);
mRecyclerView.setAdapter(nodeAdapter);
nodeAdapter.setList(getEntity());
mRecyclerView.scheduleLayoutAnimation();
}
Aggregations