简单点来说:
android:padding是内边距,控件本身的内容与控件边缘的距离。
android:layout_margin是外边距,控件与其他控件之间的距离。
下面以具体的例子来进行解释:
1、不设置边距
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_width="match_parent"
android:layout_height="300px"
android:text="@string/intent_fuzz_title"
android:layout_weight="0.5"
android:background="#FF5983"
/>
android:layout_width="match_parent"
android:layout_height="300px"
android:text="@string/adil_fuzz_title"
android:layout_weight="0.5"
android:background="#1DB0B8"
/>