title: Use LiveData with RecyclerView
body: <p>I tried to use <code>RecyclerView</code> with <code>LiveData</code> basically exactly as described in <a href="https://stackoverflow.com/questions/46585733/how-to-properly-use-livedata-with-recycleview">this question</a> It's really on the beat what I am trying to do, and I imagine it is a quite normal use case. (There is also <a href="https://stackoverflow.com/questions/44489235/update-recyclerview-with-android-livedata">this question</a> which aligns somewhat with mine )</p>
  
  <p><strong>Goal:</strong> Have an update in a table in a <strong>RoomDB</strong> propagate by <code>LiveData</code> to be visible as items in a <code>RecyclerView</code>.</p>
  
  <p>I read up on <a href="https://developer.android.com/topic/libraries/architecture/paging.html" rel="nofollow noreferrer">the paging library</a> and it seems very good but say I do not need to divide into pages for performance. I do not quite understand everything, in that article</p>
  
  <p>Here's some code from the article which I have a comment on which may be relevant to my question:</p>
  
  <pre><code>class MyActivity extends AppCompatActivity {
      @Override
      public void onCreate(Bundle savedState) {
          super.onCreate(savedState);
          MyViewModel viewModel = ViewModelProviders.of(this).get(MyViewModel.class);
          RecyclerView recyclerView = findViewById(R.id.user_list);
          UserAdapter&lt;User&gt; adapter = new UserAdapter();
  
          //Does the following line mean that they set the list on the adapter on each change in the underlying data?
          viewModel.usersList.observe(this, pagedList -&gt; adapter.setList(pagedList));
          recyclerView.setAdapter(adapter);
      }
  }
  </code></pre>
  
  <p>In the <code>observe</code> they just set the list for the adapter, in the current setup I have <code>notifyDataSetChanged()</code>(as in the linked question), which i realize is bad. I do not use <a href="https://developer.android.com/reference/android/support/v7/util/DiffUtil.html" rel="nofollow noreferrer">DiffUtil</a> which I guess is what I get for free in <code>PagedListAdapter</code> which appeals to me. I would not have arrived at just setting the list of the adapter in the <code>observe</code>, it seems to me that this is what makes <code>PagedListAdapter</code> do some heavy lifting.</p>
  
  <p>If i don't want to take advantage of paging should I still use the paging components? (to get it to do DiffUtil things for me?)</p>
  
  <p>How do I achieve the <strong>Goal</strong> as smoothly as possible with architecture components?</p>
  
  <p>Edit: Also noticed paging component is in alpha at the moment</p>