For the More Curious: ListView and GridView

The core Android OS includes ListView, GridView, and Adapter classes. Until the release of Android 5.0, these were the preferred ways to create lists or grids of items.

The API for these components is very similar to that of a RecyclerView. The ListView or GridView class is responsible for scrolling a collection of items, but it does not know much about each of those items. The Adapter is responsible for creating each of the Views in the list. However, ListView and GridView do not enforce that you use the ViewHolder pattern (though you can – and should – use it).

These old implementations are replaced by the RecyclerView implementation because of the complexity required to alter the behavior ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.