I have a LinearLayout which has a background image (a 9 patched png file).
How can I add padding to left and right so that the background image does not take up the
You should use xml drawable, specially designed for this purposes - Inset Drawable:
http://developer.android.com/guide/topics/resources/drawable-resource.html#Inset