A better way to set RecyclerView items margin

Use ItemDecoration instead of setting a margin inside the item.xml.

List is a common component that every Android developer implements in its routine/daily basis. At some point, we need to add a divider between items and/or just adjust the margin for cards to be displayed harmonically. As it’s a common problem, there are plenty of old answers on the…