ABSTRACT

In the second part of this book, you have been introduced to various UI compose elements, such as buttons, text, and images. However, until now, we have only been working with in-app memory data, which is only saved within the application process and cleared once the screen is no longer in use. This chapter aims to take your knowledge of Jetpack Compose to the next level by introducing you to the Room database. The Room database is a part of the Jetpack library developed by Google to help promote better development practices and improve the Android development process.

Additionally, we have been working on applications with only one screen since using Composables. Although we have looked at screen navigation in XML, this differs by the implementation using Compose but still the same idea. In this chapter, you will learn how to move from one composable to another using the navigation component, including passing data between them. This is an essential skill for building applications with multiple screens and will give you a deeper understanding of the navigation capabilities of Jetpack Compose.

Lastly, you will learn about Lazy Column, a composable element that can display dynamic lists within your Android application. In Chapter 8, the RecyclerView widget was used for the same purpose, which applies to XML. This required longer lines of code and classes to achieve but compose has simplified this process with the provision of LazyColumn. By the end of this chapter, you will have a clear understanding of how to use the Room database, navigate between screens, and display dynamic lists with the Lazy Column composable. Let's dive in and see the project we will build in this chapter to learn these concepts in practice.