use of com.chad.library.adapter.base.BaseQuickAdapter in project Atom_Android by Rogrand-Dev.
the class ToolTabFragment method initAdapter.
private void initAdapter() {
BaseQuickAdapter toolAdapter = new ToolAdapter(R.layout.item_tool, mDataList);
toolAdapter.openLoadAnimation();
View top = mActivity.getLayoutInflater().inflate(R.layout.view_tool_top, (ViewGroup) mRecyclerView.getParent(), false);
toolAdapter.addHeaderView(top);
toolAdapter.setOnItemClickListener((adapter, view, position) -> {
Intent intent = new Intent(mContext, ACTIVITY[position]);
startActivity(intent);
});
mRecyclerView.setAdapter(toolAdapter);
}
Aggregations