O'Reilly logo

Learning Material Design by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html.

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required