In the last chapter, you got an introduction to some of the common views available on Android and used those views to create a new interface for the TimeTracker app. Now you will expand that knowledge to create reusable components that you can use throughout the application. In this chapter, you’ll learn that views can be abstracted and reused in other layouts by using the
<include> tag; that using the
ViewStub class can reduce the performance impact of the
<include> tag; that themes can be applied to your entire application with a simple XML file; and that the new fragments APIs can be used to further abstract your UI into logical blocks that are suitable for phones, tablets, and televisions.
Reusing components ...