Thursday, March 19, 2015

Margin and Padding

Padding is the space inside the border, between the border and the actual view's content. Note that padding goes completely around the content: there is padding on the top, bottom, right and left sides (which can be independent).
Margins are the spaces outside the border, between the border and the other elements next to this view. In the image, the margin is the grey area outside the entire object. Note that, like the padding, the margin goes completely around the content: there are margins on the top, bottom, right, and left sides.
alt text

Android padding vs margin

Ref: http://stackoverflow.com/questions/4619899/difference-between-a-views-padding-and-margin?lq=1

No comments:

Post a Comment