We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18
Recycle View and
DiffUtil And many other things! More Android!
Bina Nusantara Kemanggisan
RecyclerView A RecyclerView is used to repeat views and to display dynamic lists. RecyclerView are made up of a few components ● Adapter ● Layouts
Bina Nusantara Kemanggisan
Adapter Adapters are used to manage data in the RecyclerView Adapters usually have methods of binding data to the RecyclerView layout
Bina Nusantara Kemanggisan
Layout Layouts are the design of the RecyclerView. Layouts are designed for a single list item, and will be repeated for each data.
Bina Nusantara Kemanggisan
DiffUtil DiffUtils are used in RecyclerViews to add new items to the dynamic list. It’s main purpose is to differentiate between the old and the new RecyclerView list and update it accordingly
Bina Nusantara Kemanggisan
Dictionary A dictionary is a class made for the purpose of list management. Dictionaries usually contain methods of getting the list data or generate data.
Bina Nusantara Kemanggisan
ViewHolder ViewHolders are usually in RecyclerView Adapters and is a part of the adapter that is going to bind data to the layout.
Bina Nusantara Kemanggisan
Today is going to be quite straightforward...
Bina Nusantara Kemanggisan
Today we are going to continue...
Bina Nusantara Kemanggisan
Bina Nusantara Kemanggisan We are going to make...
Bina Nusantara Kemanggisan
Bina Nusantara Kemanggisan Code Highlight DiffUtil.calculateDiff(DiffUtilCallback) calculateDiff is a command to get the difference between lists.
● DiffUtilCallback is a separate class that has methods
to differentiate between lists and extends DiffUtil.Callback
Bina Nusantara Kemanggisan
Link to This Week’s Repo https://github.com/DSC-Binus-KMG-2019/workshop5-final
Bina Nusantara Kemanggisan
Link to This Week’s Class Repo https://github.com/DSC-Binus-KMG-2019/workshop5-final-class-5