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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access