小结:

android:paddingLeft:指的是在本控件中,预留闲置多少空间

android:layout_marginLeft:指的是这个控件距离父控件的空间有多少


<LinearLayout         android:layout_height =  "28px"         android:layout_width="fill_parent"         android:orientation="horizontal"         android:gravity="center_vertical"         android:paddingLeft="25px"         android:background ="@drawable/top_bg"         >         <ImageView             android:layout_width="18px"             android:layout_height="18px"             android:src="@drawable/manage"             ></ImageView>         <TextView             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textColor="#000"             android:textSize="14px"             android:text="应用程序"             ></TextView>         </LinearLayout>         
android:paddingLeft 和 layout_marginLe 区别_第1张图片

android:paddingLeft:指的是在本控件中,预留闲置多少空间












<LinearLayout         android:layout_height =  "28px"         android:layout_width="fill_parent"         android:orientation="horizontal"         android:gravity="center_vertical"         android:layout_marginLeft="25px"         android:background ="@drawable/top_bg"         >         <ImageView             android:layout_width="18px"             android:layout_height="18px"             android:src="@drawable/manage"             ></ImageView>         <TextView             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textColor="#000"             android:textSize="14px"             android:text="应用程序"             ></TextView>         </LinearLayout>


android:layout_marginLeft:

指的是这个控件距离父控件的空间有多少android:paddingLeft 和 layout_marginLe 区别_第2张图片








更多相关文章

  1. Android 应用程序基础知识(2)
  2. Android部分控件的特殊属性
  3. Android应用程序资源管理器
  4. [置顶] Android应用程序资源管理器
  5. Android 应用程序基础知识(1)
  6. Android应用程序的debug属性
  7. 布局技巧和列表控件
  8. Android基本控件TextView
  9. android应用程序键盘事件机制

随机推荐

  1. Android中的使用ListView控件显示List集
  2. android实现淡入淡出欢迎界面
  3. android stack-trace分析
  4. ART登场,Android要和核心虚拟机Dalvik说再
  5. 百度笔试题
  6. Android(安卓)LazyList 从网络获取图片并
  7. android中action详解
  8. [转]android两次按返回键退出程序实现
  9. Android(安卓)百度地图开发之一(Hello Bai
  10. [置顶] Android ble低功耗蓝牙开发