Android 文章第一抄,下面的这些东西是转自Android Developer Help上面的。他们上面说的很详细。我这里就转载一下,特别提醒下自己。

Android Layout Attributes 的一些不容易理解的地方。

android:padding

Padding is defined as space between the edges of the view and the view's content. A views size will include it's padding. If abackgroundis provided, the padding will initially be set to that (0 if the drawable does not have padding). Explicitly setting a padding value will override the corresponding padding found in the background.

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

控件内部控件边缘和内容的空白区

android:layout_margin

Specifies extra space on the left, top, right ,and bottom sides of this view. [dimension]

控件外部边缘和其他兄弟控件的空白区域,否则大部分情况下,会是直接相连的。

android:layout_alignLeft

Specifies extra space on the left side of this view. [dimension]

就是向着某个控件的左边对齐


android:layout_alignParentRight

If true, makes the left edge of this view match the left edge of the parent. [boolean]

就是向着父控的右边对齐

<!--EndFragment-->

更多相关文章

  1. android 控件学习笔记 --------ViewPager
  2. Android 自定义View之手势解锁控件
  3. Android重要控件概览(中)
  4. Android常用布局、控件以及Android存储方式
  5. android xml控件属性
  6. Android ListView 去除边缘阴影、选中色、拖动背景色等(android:
  7. Android控件之EditText(输入文本框控件)
  8. Android--DatePickerDialog日期控件
  9. android > 控件 > RadioGroup

随机推荐

  1. 图片加载库Glide的使用
  2. Android方法过多MutiDex使用说明
  3. android 取消标题 程序意外停解决方法
  4. 修改 android 手机 hosts 文件的方法
  5. 【Android】判断某个AP是否在系统中存在(P
  6. android极简原创系列:三层结构和.net
  7. android实现从相册和相机中取照片并剪辑
  8. Android 中 ThreadLocal使用示例
  9. Android system/bin 命令
  10. Android 的R类