Connecting a dataset

Android comes equipped with the SQLite library, which is a powerful tool for creating and managing complex databases. One could easily fill an entire chapter, or even a whole book, on the subject, but as this does not really bear any relation to Material Design, we will create a very simple dataset just so that we can test out our RecyclerView.

If you would like to learn more about SQLite, comprehensive documentation can be found at

For the sake of brevity, the example here contains only three entries; however, it is very easy to expand if you choose. To add this data, create a new Java class called Contact.Java and complete like so:

public class ...

Get Learning Material Design 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.