Chapter 16: Adapters and Recyclers

In this brief chapter, we will achieve a lot. We will first go through the theory of adapters and lists – how we can extend the RecyclerAdapter class in Java code and add a RecyclerView instance that acts as a list to our UI – and then through the apparent magic of how the Android API binds them together so that RecyclerView displays the contents of RecyclerAdapter and allows the user to scroll through the contents. You have probably guessed that we will be using this technique to display our list of notes in the Note to Self app.

In this chapter, we will cover the following:

  • Looking at the theory of adapters and binding them to our UI
  • Implementing the layout with RecyclerView
  • Laying out a list item for ...

Get Android Programming for Beginners - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.