title: How to use androidx.recyclerview.widget.RecyclerView with tools:listitem?
body: <p>How to use <code>androidx.recyclerview.widget.RecyclerView</code> with <code>tools:listitem</code>?
  I have this layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.recyclerview.widget.RecyclerView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/recyclerViewActors"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
      tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
      tools:listitem="@layout/list_item_actor"
      tools:itemCount="5"
      tools:orientation="horizontal"
      tools:scrollbars="horizontal"
      tools:spanCount="2"/&gt;
  </code></pre>
  
  <p>but <em>Design</em> tab doesn't show preview: </p>
  
  <p><a href="https://i.stack.imgur.com/GdlkB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GdlkB.png" alt="enter image description here"></a></p>
  
  <p>And if I change <code>androidx.recyclerview.widget.RecyclerView</code> in this layout to <code>ListView</code>, the preview works:</p>
  
  <p><a href="https://i.stack.imgur.com/hs4Zj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hs4Zj.png" alt="enter image description here"></a></p>