LinearLayout 特有属性
属性
-
android:baselineAligned
:When set to false, prevents the layout from aligning its children's baselines. [boolean]默认true
:设置布局控件和文字的基线对齐
-
android:baselineAlignedChildIndex
:When a linear layout is part of another layout that is baseline aligned, it can specify which of its children to baseline align to (that is, which child TextView).[integer]:Related Methods
- setBaselineAlignedChildIndex(int)
-
android:divider
:Drawable to use as a vertical divider between buttons.垂直分割Related Methods
- setDividerDrawable(Drawable)
-
android:gravity
:Specifies how an object should position its content, on both the X and Y axes, within its own bounds.[enum]:定义控件的位置Values
- top:
- bottom
- left
- right
- center_vertical
- fill_vertical
- certer_horizontal
- fill_horizontal
- center
- fill
- clip_vertical
- clip_horizontal
- start
- end
Related Methods
- setGravity(int)
-
android:measureWithLargestChild
:When set to true, all children with a weight will be considered having the minimum size of the largest child. If false, all children are measured normally.[boolean]:如果设置为ture
子控件的尺寸需要考虑最小尺寸的最大控件Related Methods
- setMesureWithLargestChildEnabled(boolean)
-
android:orientation
:Should the layout be a column or a row? [enum]:设置控件布局的方式Values
- horizontal:0
- vertical:1
Related Methods
- setOrientation(int)
-
android:weightSum
:Defines the maximum weight sum.[float]:设置权重的总和。(默认是全部子控件权重之和)
网友评论