Skip to content Skip to sidebar Skip to footer

What Controls The Default Padding Between Views?

When I put a view on a layout, it automatically has some padding/margin on it. See this picture: The red rectangle show the space that the button takes. Note the empty space betw

Solution 1:

The button has a default background set by Android. If you look at Android source code, you can find that the button's background has a transparent area around it. This is done in order to make it into a nine-patch drawable. So you cannot remove that padding unless you specify your own background drawable for the button.


Post a Comment for "What Controls The Default Padding Between Views?"