use of com.chad.baserecyclerviewadapterhelper.adapter.PullToRefreshAdapter in project BaseRecyclerViewAdapterHelper by CymChad.
the class PullToRefreshUseActivity method initAdapter.
private void initAdapter() {
pullToRefreshAdapter = new PullToRefreshAdapter();
pullToRefreshAdapter.setOnLoadMoreListener(this, mRecyclerView);
pullToRefreshAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_LEFT);
// pullToRefreshAdapter.setAutoLoadMoreSize(3);
mRecyclerView.setAdapter(pullToRefreshAdapter);
mCurrentCounter = pullToRefreshAdapter.getData().size();
mRecyclerView.addOnItemTouchListener(new OnItemClickListener() {
@Override
public void onSimpleItemClick(final BaseQuickAdapter adapter, final View view, final int position) {
Toast.makeText(PullToRefreshUseActivity.this, Integer.toString(position), Toast.LENGTH_LONG).show();
}
});
}
Aggregations