O'Reilly logo

Android UI Fundamentals: Develop and Design by Jason Ostrander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5. Reusable UI

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.

Abstracting Your Layouts

Reusing components ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required