A Lesson by Mike Wolfson
This video will show how to use the granular notification methods available in the RecyclerView.Adapter to change the contents of a list. Using these methods will result in a more efficient list change, and also will include delightful animations when items are inserted, deleted or moved.
I will explain why using the notifyDataSetChanged() method is not the best choice when using the RecyclerView, and why you should use the detailed notify methods to update your list contents effectively.
The sample code used in this video builds upon the code from the RecyclerView: Drag & Drop and Swipe to Dismiss using ItemTouchHelper lesson. You could also start with the Bootstrap: Adding a new Fragment with a RecyclerView lesson, which will work exactly the same.
Code for the Lesson
Pro members: Log in to view the code for this lesson!
Lessons in this course
- RecyclerView – Introduction
- RecyclerView – Creating a Vertical List
- RecyclerView – Reverse ordering and Horizontal list
- RecyclerView – GridLayoutManager and SpanSizeLookup
- RecyclerView: Using StaggeredGridLayoutManager for Variably Sized Content
- RecyclerView: Using ItemDecoration to add simple dividers and custom dividers
- RecyclerView: ItemDecoration Advanced Usage and Customization
- RecyclerView: Drag & Drop and Swipe to Dismiss using ItemTouchHelper
- RecyclerView: Animate Content Changes