Chapter 10. Building more advanced Android views
This chapter covers
- Using recycler views
- Configuring and handling menus
- Activity navigation and the Back button
- Setting app icons
- Styles, themes, and XML drawables
- MvvmCross application lifecycle and launch screens
In chapter 9 we looked at the basics of creating an Android UI, including layout files, images, and activities, and we ended up by building the complete UI for SquareRt. In this chapter we’ll be looking at some more advanced Android UI topics so we can build the UI for Countr: using recycler views to show lists of data, and adding menu items to the Android toolbar, for example. We’ll then look at improving our apps’ icons and launch screens.
SquareRt is done, so let’s move on to Countr. Start by launching the Countr solution from chapter 8 and the dummy first view activity and layout, just as you did for SquareRt. This is a more complicated UI that has two screens, so you’ll need two activities and two layouts. I’ll be showing you how to create these UIs in code as it’s easier to show in a book, but feel free to try to achieve the same results using the Designer (keeping in mind that you’ll have to switch back to the Source view to set up the MvvmCross bindings).
Figure 10.1 shows the UI we want to create.