Android ListView Tutorial with Kotlin

In this tutorial, you’ll learn how to use Android’s ListView to easily create scrollable lists, by creating a simple recipe list app using Kotlin. By Joe Howard.

Leave a rating/review
Download materials
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Where to Go From Here?

You can download the completed project using the download button at the top or bottom of this tutorial.

When you develop for Android, AdapterViews are a common concept that you’ll run into over and over again.

If you want to know more about the inner workings of the ListView and performance details, check out this article on performance tips for Android ListViews.

There are other ways to create lists, such as subclassing a ListActivity and ListFragment. Both of these links take you to the official Android developer site so that you can learn more about how they work.

Both of these alternatives impose the restriction that the respective activity or fragment can only contain a ListView as its child view. Suppose you wanted an activity that had a ListView as well as some other views, it would be impossible with a ListActivity. The same goes for the ListFragment scenario.

And be sure to check out our RecyclerView and Intermediate RecyclerView tutorials to see the more modern way to show lists on Android. Unlike ListView, RecyclerView enforces the use of the ViewHolder pattern and is much more flexible in terms of layout and animation.

Feel free to share your feedback, findings or ask any questions in the comments below or in the forums. Talk to you soon!

Contributors

Odie Edo-Osagie

Author

Over 300 content creators. Join our team.