常用布局基础

padding 是 View 中的属性

ViewGroup.LayoutParams 定义了 width height 属性

ViewGroup.MarginLayoutParams
extends ViewGroup.LayoutParams 新增了 margin 属性

gravity 属性绝大多数控件都有,并且使用不受方向限制

……………………………….

LinearLayout 自身属性

orientation

LinearLayout.LayoutParams 独有属性

gravity 对应 android:layout_gravity,使用受orientation属性限制
weight

…………………………………

RelativeLayout.LayoutParams 独有属性
alignWithParent

………………………………….

left是绝对的左边,start会根据不同的国家习惯改变。

比如在从右向左顺序阅读的国家,start代表的就是在右边

猜你喜欢

转载自blog.csdn.net/u013738122/article/details/80866782