android tutorial - Add divider lines to recyclerview items in android - android studio - android app developement
Add an adapter and call .notifyDataSetChanged(); as usual ! This is not an inbuilt feature of Recyclerview but added in the support libraries. So don't forget to include this in your app level build.gradle file
Multiple ItemDecorations can be added to a single RecyclerView.
Changing divider color
It's pretty easy to set an color for a itemDecoration. step is: creating a divider.xml file which is located on drawable folder
step is: setting drawable
Learn android - android tutorial - Changing Divider - android examples - android programs