Learning Android Development

RecyclerView and LazyColumnFor in Jetpack Compose

Learn The RecyclerView of Jetpack Compose

Photo by Martin Sanchez on Unsplash

Most of the Apps if not all, will need to store a list of items to be viewed. RecyclerView is the key view one cannot go without in developing a professional App.

As we are transitioning to Jetpack Compose, the ability to display a list of items is most important. Hence this article looks into both approach and share them.

RecyclerView

This is presented for comparison with LazyColumnFor. If you already familiar with RecyclerView, you can skip to the next section.

In conventional Android Development, we will need to have XML to define the layout view. For RecyclerView, we’ll need to have at least 2 layouts, one is the Activity layout that contains the RecyclerView, and the other the Item Layout for the individual ViewHolder.

On top of that, to access the XMLs, we’ll have the Activity Class and the ViewHoldre class, which are connected through the RecyclerView.Adaptor class.

The XMLs

--

--