title: Android RecyclerView update item from background listener and move top
body: <p>I am working on an instant messaging project. There is a message handler background service which is listening to incoming messages, creates events via greenrobot's eventbus for subscribing Activity, and activity refreshes RecyclerView for updated messages. RecyclerView shows only latest messages of people.</p>
  
  <p>My question is how can i update and move to top a cardview or list item. My current solution is clearing and then adding all messages when a message is received.</p>
  
  <p>You can find implementation of message flow <a href="https://gist.github.com/onatm/adfead9e5f3fa3233e39" rel="nofollow">here</a>.</p>