I encountered a problem with the Button
view when I set a background to it using the android:background
attribute in xml. Before I set the background,
Another option if you want to support anything below API Level 21 is to create a custom drawable with a transparent stroke around a colored shape. This gives you the flexibility of also adding block colors and gradients.
Note the stroke
with and transparency which shrinks the button size
button_background.xml
Button