use of com.chad.baserecyclerviewadapterhelper.loadmore.CustomLoadMoreView in project BaseRecyclerViewAdapterHelper by CymChad.
the class PullToRefreshUseActivity method addHeadView.
private void addHeadView() {
View headView = getLayoutInflater().inflate(R.layout.head_view, (ViewGroup) mRecyclerView.getParent(), false);
headView.findViewById(R.id.iv).setVisibility(View.GONE);
((TextView) headView.findViewById(R.id.tv)).setText("change load view");
headView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mLoadMoreEndGone = true;
pullToRefreshAdapter.setLoadMoreView(new CustomLoadMoreView());
mRecyclerView.setAdapter(pullToRefreshAdapter);
Toast.makeText(PullToRefreshUseActivity.this, "change complete", Toast.LENGTH_LONG).show();
}
});
pullToRefreshAdapter.addHeaderView(headView);
}
Aggregations