use of com.chad.baserecyclerviewadapterhelper.adapter.HomeAdapter in project BaseRecyclerViewAdapterHelper by CymChad.
the class HomeActivity method initAdapter.
private void initAdapter() {
BaseQuickAdapter homeAdapter = new HomeAdapter(R.layout.home_item_view, mDataList);
homeAdapter.openLoadAnimation();
View top = getLayoutInflater().inflate(R.layout.top_view, (ViewGroup) mRecyclerView.getParent(), false);
homeAdapter.addHeaderView(top);
mRecyclerView.addOnItemTouchListener(new OnItemClickListener() {
@Override
public void onSimpleItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent(HomeActivity.this, ACTIVITY[position]);
startActivity(intent);
}
});
mRecyclerView.setAdapter(homeAdapter);
}
Aggregations