Enter RecyclerView
RecyclerView
, on its own, does very little other than help manage view recycling (e.g., row recycling of a vertical list). It delegates almost everything else to other classes, such as:
- a layout manager, responsible for organizing the views into various structures (vertical list, grid, staggered grid, etc.)
- an item decorator, responsible for applying effects and light positioning to the views, such as adding divider lines between rows in a vertical list
- an item animator, responsible for animated effects as the model data changes
- and so on
Through “adapter” and “view-holder” classes, we teach RecyclerView
what should go into the list rows, grid cells, or whatever. RecyclerView
then handles the scrolling and recycling for us.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.