Android Lists and Adapters
![Treehouse](https://static.mytechlogy.com/cache/837bb01961ab4429c6b8cbecf077a2aa_w30_h30_cp_sc.png)
Treehouse
Course Summary
A collection of data is often represented in an app in some sort of list. In this course we will learn about the popular Android component called ListView to display and interact with a list of items. We will also learn about RecyclerView, a newer, more efficient version of ListView. We will see how to use some default components as well as building custom lists with our own layouts and adapters.
-
+
Course Description
About this Course A collection of data is often represented in an app in some sort of list. In this course we will learn about the popular Android component called ListView to display and interact with a list of items. We will also learn about RecyclerView, a newer, more efficient version of ListView. We will see how to use some default components as well as building custom lists with our own layouts and adapters. What you'll learn
- ListView
- Custom list item layouts
- Custom adapters
- RecyclerView
- ViewHolder
About the Teacher
Ben is a father, husband, son, friend, and teacher. He is firmly committed to the belief that the world is evolving to a better place. Find him on Twitter @benjakuben.
-
+
Course Syllabus
Updating the Data Model
The first thing we need to do is get the list of data we want to display from our forecast API. We will update the data model classes and have it ready to plug into a list. 9 steps- Introducing the Project 2:54
- Adding a New Data Model Object 4:23
- Finishing the Data Model 4:57
- Review: Updating the Data Model 3 questions
- Getting the Whole Forecast 5:41
- Getting the Whole Forecast 3 questions
- Introducing JSONArray 3:51
- From JSONArray to a Java Array 8:19
- Using JSONArray 2 objectives
Standard ListViews
We'll start this project by learning how to use some simple default list views and adapters, which is helpful for certain kinds of lists. 9 stepsCustom ListViews
We have lots of data to display, so next we will learn how to customize the layout and adapter for a ListView to show more data. 7 stepsUsing Parcelable Data
"Parcelable" is a Java interface that is used in Android to make data easy to transfer from one thing to another. We often use it when transferring from one Activity to another, which we will see how to do in this stage. 6 stepsLists with RecyclerViews
In Android 5.0 (Lollipop) a new view for lists was added called RecyclerViews. It's a more efficient way to list large data sets, and it's an important tool to add your belt. 11 stepsActing on List Item Taps
Though the mechanism is slightly different, both ListViews and RecyclerViews allow us to easily take action when an item in a list is tapped on. 6 steps