I am trying to use the attached nine patch image as the background for a View in my app (the image is from the android-15 sdk resources). As pictured, the image has two vertical dots to the left of image, two horizontal dots above the image, and a horizontal line below the image. These dots/line from the images show in my app.
I copied the file from the sdk folder into my resources directory, and set the drawable resource as the background for my view. What is the proper way to use this image as the background of a view, such that the dots/line do not show?

The lines and dots are what make this a
NinePatch. The dots on the left side and the top define the area that can stretch, while the other two lines define the bounding box for drawing things inside theNinePatch.If you set such an image as a background – those lines will not be shown. To create these images yourself, you can use the draw9patch tool in the android sdk (http://developer.android.com/guide/developing/tools/draw9patch.html).
One thing to remember, is that the file type for a
NinePatchimage has to be, for example:image.9.png. Otherwise those lines will be drawn.