LinearLayout 特有屬性

LinearLayout 特有屬性

屬性

  1. android:baselineAligned:When set to false, prevents the layout from aligning its children's baselines. [boolean]默認(rèn)true:設(shè)置布局控件和文字的基線對(duì)齊
  1. 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)
  2. android:divider:Drawable to use as a vertical divider between buttons.垂直分割

    Related Methods

    • setDividerDrawable(Drawable)
  3. 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)
  4. 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]:如果設(shè)置為ture子控件的尺寸需要考慮最小尺寸的最大控件

    Related Methods

    • setMesureWithLargestChildEnabled(boolean)
  5. android:orientation:Should the layout be a column or a row? [enum]:設(shè)置控件布局的方式

    Values

    • horizontal:0
    • vertical:1

    Related Methods

    • setOrientation(int)
  6. android:weightSum:Defines the maximum weight sum.[float]:設(shè)置權(quán)重的總和。(默認(rèn)是全部子控件權(quán)重之和)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容