CHAPTER 9: Android Graphic Design: Making Your UI Designs Visual 319
As you can see in Figure 9-8, a number of other useful controls exist at the bottom of your editing
pane. These include a Zoom slider, which will allow you to adjust the zoom level of your source
graphic in the editing area.
The other slider in the bottom is the Patch scale slider, which will allow you to adjust the scaling
of the actual NinePatchDrawable preview imagery which is being shown in the preview area on the
right side of the display.
The Show lock option check box will allow you to visualize the non-drawable areas of the
NinePatchDrawable when you mouse-over them. The Show content option check box highlights
your content area in a preview pane image, where purple shows the area in which any Android View
subclass (widget or layout container) content will be allowed to composite (to show through from
other z-order “layers” in your user interface compositing stack) with your NinePatchDrawable.
A NinePatchDrawable can generally be contained (utilized) within any Android class that supports
an Android Drawable asset referenced using either the source (android:src) image plate or the
background image plate (android:background) parameter, including ImageButton, ImageView,
ViewGroup, and so forth.
The Show patches option check box, which we have just enabled, allows us to preview our scalable
patch definitions in real-time in the left pane editing area. The pink color will represent the area of the
patch that is scalable.
Figure 9-8. Turn on the Show patches check box option; finished drawing of the top one-pixel black line segment