android:layout_margin : 控件距離父控件的距離android
android:padding : 控件內部內容距離控件的內容it
android:gravity:是對該view中內容的限定.好比一個button 上面的text. 你可設置該text 相對於view的靠左,靠右等位置layout
android:layout_gravity:是用來設置該view相對與父view 的位置.好比一個button 在linearlayout裏,你想把該button放在linearlayout裏靠左、靠右等位置就能夠經過該屬性設置
margin