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.
An image says more than 1000 words:

本文详细解释了在用户界面设计中,Padding(填充)与Margin(边界)的概念及其区别。Padding是指视图内容与边框之间的空间,而Margin则是指视图边框与相邻元素之间的空间。通过图文并茂的形式帮助读者更好地理解这两个概念。
7401

被折叠的 条评论
为什么被折叠?



