title: Android: add divider to top of RecyclerView
body: <p>I was able to add dividers on the bottoms of cells in a <code>RecyclerView</code>:</p>
  
  <pre><code>this.recyclerView.layoutManager = layoutManager
  val dividerItemDecoration = DividerItemDecoration(this.recyclerView.context, layoutManager.orientation)
  this.recyclerView.addItemDecoration(dividerItemDecoration)
  </code></pre>
  
  <p>Here is the result:</p>
  
  <p><a href="https://i.imgur.com/9lv5aXK.png" rel="nofollow noreferrer"><img src="https://i.imgur.com/9lv5aXK.png" alt="enter image description here"></a></p>
  
  <p>How can I add a line to the top of the very first cell?</p>