Chapter 2. Creational Patterns
In the previous chapter, we took a look at the factory pattern and its associated abstract factory pattern. However, we looked at these patterns in quite a general way and not at how these objects, once created, can be represented and manipulated on an Android device. In other words, the patterns we built could have been applied in many other software environments, and to see how to make them more Android-specific we need to take a look at Android UIs and how they are composed.
In this chapter, we will concentrate on how to represent our products as Android UI components. We will use the card view to display these, and each card will contain a title, an image, some descriptive text, and the ingredient's calorific value, as can be seen in the following screenshot:
This will lead us to take an initial look at material design, a powerful and increasingly popular visual design language for creating clean and intuitive UIs. Conceived originally for...