How to add dividers using and DividerItemDecoration

suggest change

The DividerItemDecoration is a RecyclerView.ItemDecoration that can be used as a divider between items.

DividerItemDecoration mDividerItemDecoration = new DividerItemDecoration(context,
             mLayoutManager.getOrientation());
recyclerView.addItemDecoration(mDividerItemDecoration);

It supports both orientation using DividerItemDecoration.VERTICAL and DividerItemDecoration.HORIZONTAL.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents