In Elements, the adapter is final and can’t be extended, as you would typically do with other list management library. The adapter acts as an orchestrator of the different, modular components that will be involved in displaying the list items.
Describing what the adapter does will be helpful to introduce these components and for you to understand what the library can do. The adapter responsibilities are:
Presenters: for example, dispatches elements to the correct presenter [docs]
Sources: for example, creates a dependency tree among them, throwing in case of circular dependencies [docs]
Pages: for example, if
pageSizeHintis specified, the adapter will automatically open a new page when the
pageSizeHint-th element has been requested for the current page [docs]
Elements: for example, finds the correct presenter, and orders them based on the source behavior.
DiffUtil, like the Paging library does.
As a side feature, the adapter will install an
Animator as default item animator for your
See Animations for more informations.