Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LinearLayoutManager llm = new LinearLayoutManager(context);
- llm.setOrientation(LinearLayoutManager.VERTICAL);
- llm.setStackFromEnd(true);
- recyclerView.setLayoutManager(llm);
- @Override
- public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
- if (messages.size() > 8 && position == 0 && null != mLoadMoreCallbacks) {
- mLoadMoreCallbacks.onLoadMore();
- }
- @Override
- public void onLoadMore() {
- // Get data from database and add into arrayList
- chatMessagesAdapter.notifyDataSetChanged();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement