In this video I am going show how to add dividers between your list items. To add dividers, we will use a facility built into RecyclerView named ItemDecoration, which is a special class that allows the application to draw offsets and drawables onto a RecyclerView.
- Add list dividers to RecylerView that uses Linear, Grid, and StaggaredGrid Layout Managers
- Show how to write and use a custom ItemDecoration class
- Explain how\when to use ItemDecoration methods: onDraw(), onDrawOver(), and getItemOffsets()
- Proper way to access adapter information from class (using getChildAdapterPosition())
- Using CardView for variably sized content