Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. LinearLayoutManager llm = new LinearLayoutManager(context);
  2. llm.setOrientation(LinearLayoutManager.VERTICAL);
  3. llm.setStackFromEnd(true);
  4. recyclerView.setLayoutManager(llm);
  5.  
  6. @Override
  7. public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
  8. if (messages.size() > 8 && position == 0 && null != mLoadMoreCallbacks) {
  9. mLoadMoreCallbacks.onLoadMore();
  10. }
  11.  
  12. @Override
  13. public void onLoadMore() {
  14. // Get data from database and add into arrayList
  15. chatMessagesAdapter.notifyDataSetChanged();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement