Chapter 7
Graphics and Drawing
Android’s UI toolkit is squarely focused on flexibility, and the ability to create content that flawlessly scales across all possible device types. We’ve already looked at how the view system helps developers adapt to this requirement. In this chapter, we will discuss additional techniques for enhancing your application’s user interface using Android’s extensible graphics object, the drawable. You will see how we can leverage drawables to make flexible and animated graphic elements that can be associated with any view. It’s all about doing more work with fewer image resources in your application.
7-1. Creating Drawables as Backgrounds
Problem
Your application needs to create background images that can scale ...
Get Android Recipes: A Problem-Solution Approach for Android 5.0, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.