?
Ce document utilise Manuel du site Web PHP chinois Libérer
TableRow.LayoutParams
版本:Android 3.0 r1
?
類結(jié)構(gòu)
public class TableRow extends LinerLayout
?
java.lang.Object
android.view.ViewGroup.LayoutParams
? ???? android.view.ViewGroup.MarginLayoutParams
? ???? ?????? android.widget.LinearLayout.LayoutParams
? ???? ?????? ?????? android.widget.TableRow.LayoutParams
?
類概述
???????? 設(shè)置在表格行中使用的布局參數(shù)
???????? 參見
?????????????????? TableLayout.LayoutParams
?
XML屬性
屬性名稱 |
描述 |
android:layout_column |
該子元素所在的列的索引值。必須是一個整數(shù)值,例如“100”。 |
android:layout_span |
定義此子元素跨越多少列。必須>=1。必須是一個整數(shù)值,例如“100”。 |
?
字段
???????? public int column
???????? 單元格cell在widget上代表的列索引。
?
???????? public int span
??? widget跨越的列數(shù)
?
構(gòu)造函數(shù)
???????? public TableRow.LayoutParams (Context c, AttributeSet attrs)
????????
???????? public TableRow.LayoutParams (int w, int h)
???????? 設(shè)置子元素的寬度和高度
?????????????????? 參數(shù)
??????????????????????????? w ??? 期望高度
??????????????????????????? h ???? 期望寬度
?
???????? public TableRow.LayoutParams (int w, int h, float initWeight)
?
?????????????????? 參數(shù)
??????????????????????????? w ??? 期望高度
??????????????????????????? h ???? 期望寬度
initWeight ????? 期望權(quán)重(weight)
?
???????? public TableRow.LayoutParams ()
???????? 設(shè)置子元素的寬度為ViewGroup.LayoutParams
,高度參數(shù)為WRAP_CONTENT
。
?
???????? public TableRow.LayoutParams (int column)
???????? 設(shè)置指定列上的視圖的寬度參數(shù)為MATCH_PARENT
,高度參數(shù)為WRAP_CONTENT
?????????????????? 參數(shù)
??????????????????????????? column ?? 視圖中列的索引
?
???????? public TableRow.LayoutParams (ViewGroup.LayoutParams p)
?
???????? public TableRow.LayoutParams (ViewGroup.MarginLayoutParams source)
?
公共方法
???????? protected void setBaseAttributes (TypedArray a, int widthAttr, int heightAttr)
???????? 從提供的參數(shù)中提取出布局參數(shù)
??? ??? 參數(shù)
??????????????????????????? a ???? 從布局參數(shù)中提取的樣式屬性
widthAttr ?????? 寬度屬性的標識符
heightAttr ????? 高度屬性的標識符
?