O'Reilly logo

Learning Android Canvas by Mir Nauman Tahir

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

Chapter 4. NinePatch Images

In this chapter we will learn about NinePatch images: what they are, their importance, how they are created, how they can be used, and what difference they can make in our Android applications.

NinePatch images are important because we want to develop our layout in such a way that it can adjust if either the orientation changes or our application is hosted on devices with different resolution. Our application layout needs to be flexible enough to adjust according to the resolution, screen size, and orientation of different devices. NinePatch images are images that have stretchable areas. The stretchable areas can stretch horizontally and vertically to encapsulate the content inside. The best part is that, if the width ...

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