This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parame
The RecyclerView is a bit different from the ListView. Actually, the RecyclerView needs a ListView like structure in it. For example, a LinearLayout. The LinearLayout has parameters for the dividing each element.
In the code below I have a RecyclerView comprised of CardView objects within a LinearLayout with a "padding" that will put some space between items. Make that space really small and you get a line.
Here's the Recycler view in recyclerview_layout.xml
And here is what each item looks like (and it shows as divided due to the android:padding in the LinearLayout that surrounds everything.) in another file: cards_layout.xml