Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

67. RecyclerView With EmptyView

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 shows you how to add an empty View to the RecyclerView which is displayed when the RecyclerView has no items to display. In our app BucketDrops, we hide the Toolbar and the RecyclerView when there are no items and we show them and hide the empty view when we have atleast one item to display. We use the RecyclerView.AdapterDataObserver class that notifies us of changes in the the RecyclerView’s items with the help of its onChanged, onItemRangeChanged, onItemRangeInserted, onItemRangeMoved, onItemRangeRemoved methods which are triggered when different notifyXXX methods are used in the RecyclerView.Adapter subclass

Course Cirriculum