i think its the easiest way
mDividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
DividerItemDecoration.VERTICAL);
// or DividerItemDecoration.HORIZONTALL
mDividerItemDecoration.setDrawable(getDrawable(R.drawable.myshape));
recyclerView.addItemDecoration(mDividerItemDecoration);
Note that : myshape can be rectangel with height you want to make your divider