This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parame
This is simple, you don't need such complicated code
DividerItemDecoration divider = new
DividerItemDecoration(mRVMovieReview.getContext(),
DividerItemDecoration.VERTICAL);
divider.setDrawable(
ContextCompat.getDrawable(getBaseContext(), R.drawable.line_divider)
);
mRVMovieReview.addItemDecoration(divider);
Add this in your drawable : line_divider.xml