use of com.chad.library.adapter.base.listener.OnItemClickListener in project BaseRecyclerViewAdapterHelper by CymChad.
the class HeaderAndFooterUseActivity method initAdapter.
private void initAdapter() {
headerAndFooterAdapter = new HeaderAndFooterAdapter(PAGE_SIZE);
headerAndFooterAdapter.openLoadAnimation();
mRecyclerView.setAdapter(headerAndFooterAdapter);
mRecyclerView.addOnItemTouchListener(new OnItemClickListener() {
@Override
public void onSimpleItemClick(BaseQuickAdapter adapter, View view, int position) {
Toast.makeText(HeaderAndFooterUseActivity.this, "" + Integer.toString(position), Toast.LENGTH_LONG).show();
}
});
}
Aggregations