This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parame
ListView
I have added a line in list item like below
1px will draw the thin line.
If you want to hide the divider for the last row then divider.setVisiblity(View.GONE); on the onBindViewHolder for the last list Item.
divider.setVisiblity(View.GONE);