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 buy this course, or login to your account to view this lesson.

Alright, buy it for $25 Or login to your account if you purchased already.

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