I have this issue on my EditText and Button views, where I have a nice padding for them to space away from the text, but when I change the backgrou
You can give some padding by using 9-patch images and defining the content area in the drawable. Check this
You can also set the padding in your layout from xml or programatically
xml padding tags
android:padding
android:paddingLeft
android:paddingRight
android:paddingTop
android:paddingBottom
You can try setting the padding manually from the code after you call the setBackgroundDrawable by calling setPadding on your EditText or Button Views