Chapter 9. Building simple Android views
This chapter covers
- Android resources
- Creating layout resources in the Designer and by editing the source
- Adding images to support multiple screen densities
- Creating views using activities
- The activity lifecycle
In the previous two chapters we built the model and view-model layers for our two apps. Now it’s time to turn our attention to the view layer. This layer uses platform-specific code, so we’re going to look at it platform by platform—in this chapter and the next, we’ll look at Android (figure 9.1), followed by iOS in chapters 11 and 12.
Figure 9.1. The view layer in an MVVM app is written in platform-specific code.
We’ll start here by looking at how to build an Android UI. Then we’ll build ...