Create your account

Already have an account? Login here

Create account

72. Introduction to RecyclerView Item Decoration

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to become a pro member, or login to your account to view this lesson.

Alright, join now. Or login to your account if you're already a pro member.

This video talks about how to draw a Divider between items of a RecyclerView using the RecyclerView.ItemDecoration class. Override the getItemOffsets method that lets you specify whether you want to allocate space to draw a divider between the RecyclerView items. Override the onDraw method which lets you draw the divider below the item or you can use the onDrawOver method which lets you draw the divider above the item. Finally specify the left, top, right and bottom values to draw the divider as per your requirements.

Course Cirriculum