I\'m working on a android chatting application. When I called my api it returns me the chat list sorted by a user_id. But what I need to do is serialized by
Add this lines of code before passing to RecyclerView Adapter
Collections.sort(yourLists, new Comparator() { @Override public int compare(YourList lhs, YourList rhs) { return lhs.getId().compareTo(rhs.getId()); } });