private void init() { setTitle(App.ctx.getString(R.string.contact_findFriends)); adapter = new HeaderListAdapter<>(SearchUserItemHolder.class); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setOnLoadDataListener( new RefreshableRecyclerView.OnLoadDataListener() { @Override public void onLoad(int skip, int limit, boolean isRefresh) { loadMoreFriend(skip, limit, isRefresh); } }); recyclerView.setAdapter(adapter); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.contact_add_friend_activity); init(); recyclerView.refreshData(); }
@OnClick(R.id.searchBtn) public void search(View view) { searchName = searchNameEdit.getText().toString(); recyclerView.refreshData(); }