關於Android的margin(當前視圖與周圍視圖的距離)和padding(當前視圖與內部內容的距離)
阿新 • • 發佈:2017-08-13
utf mas 關於 roi pad code odi ren cnblogs
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="300dp" android:background="#00aaff" android:orientation="vertical" android:padding="5dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="20dp" android:background="#ffff99" android:padding="60dp"> <view android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ff0000"> </view> </LinearLayout> </LinearLayout>
關於Android的margin(當前視圖與周圍視圖的距離)和padding(當前視圖與內部內容的距離)