In this chapter, we introduced Android views and ViewGroups. We presented the most common views and ViewGroups, giving examples of each component and the common actions associated with them.
We also discussed two methods to create user interfaces: either by using layout files or doing it programmatically in Java.
Additionally, we walked through two examples of how to create custom views: the first example detailed a simple view with custom drawing code and the second example detailed how to add extra functionality to the TextView
class.
Finally, we finished this chapter by reviewing additional UI components that are commonly used in Android development, including Toasts and dialogs.
In the next chapter, we will have a detailed look at how to add ListViews
to our application, optimize them for performance, and replace them with RecyclerViews
; we'll also look at how to use adapters to feed data to the list.