欢迎来到 Android人的问与答 ,在这里提问或帮助他人解答。 Question2Answer的1.6.x和1.7.x版本的中文翻译包我修改更新:

Question2answer

如何使用中文语言包

Q2A 1.6.x - Chinese Simplified (简体中文)

Q2A 1.7.x - Chinese Simplified (简体中文)


国内服务器推荐 阿里云服务器
国外服务器推荐 DigitalOcean
VPN推荐 正版Green VPN
阿里云推荐码:ldvq50

Android中View的Padding和Margin有什么区别

0 喜欢 0 不喜欢
142 浏览

简单来讲,Padding是边界内,Margin是边界外。

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 (extracted from Margin Vs Padding - CSS Properties):

 
最新提问 12月 31, 2014 分类:Android View | 用户: forlong401 (7,050 分)

登录 或者 注册 后回答这个问题。

...