Most visited

Recently visited

Added in API level 1

TableRow.LayoutParams

public static class TableRow.LayoutParams
extends LinearLayout.LayoutParams

java.lang.Object
   ↳ android.view.ViewGroup.LayoutParams
     ↳ android.view.ViewGroup.MarginLayoutParams
       ↳ android.widget.LinearLayout.LayoutParams
         ↳ android.widget.TableRow.LayoutParams


表格行中使用的布局参数集。

也可以看看:

Summary

XML attributes

android:layout_column The index of the column in which this child should be. 
android:layout_span Defines how many columns this child should span. 

Inherited XML attributes

From class android.widget.LinearLayout.LayoutParams
From class android.view.ViewGroup.MarginLayoutParams
From class android.view.ViewGroup.LayoutParams

Inherited constants

From class android.view.ViewGroup.LayoutParams

Fields

public int column

小部件表示的单元格的列索引。

public int span

小部件跨越的列数。

Inherited fields

From class android.widget.LinearLayout.LayoutParams
From class android.view.ViewGroup.MarginLayoutParams
From class android.view.ViewGroup.LayoutParams

Public constructors

TableRow.LayoutParams(Context c, AttributeSet attrs)

TableRow.LayoutParams(int w, int h)

设置子宽度和子高度。

TableRow.LayoutParams(int w, int h, float initWeight)

设置孩子的宽度,高度和体重。

TableRow.LayoutParams()

将子宽度设置为 ViewGroup.LayoutParams ,将子高度设置为 WRAP_CONTENT

TableRow.LayoutParams(int column)

将视图放在指定的列中。

TableRow.LayoutParams(ViewGroup.LayoutParams p)

TableRow.LayoutParams(ViewGroup.MarginLayoutParams source)

Protected methods

void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)

从提供的属性中提取布局参数。

Inherited methods

From class android.widget.LinearLayout.LayoutParams
From class android.view.ViewGroup.MarginLayoutParams
From class android.view.ViewGroup.LayoutParams
From class java.lang.Object

XML attributes

android:layout_column

这个孩子应该在哪一列的索引。

必须是整数值,例如“ 100 ”。

这也可能是对包含此类型值的资源(形式为“ @[package:]type:name ”)或主题属性(形式为“ ?[package:][type:]name ”)的 ?[package:][type:]name

这对应于全局属性资源符号 layout_column

android:layout_span

定义这个孩子应该跨越多少列。 必须> = 1。

必须是整数值,例如“ 100 ”。

这也可能是对包含此类型值的资源(形式为“ @[package:]type:name ”)或主题属性(形式为“ ?[package:][type:]name ”)的 ?[package:][type:]name

这对应于全局属性资源符号 layout_span

Fields

column

Added in API level 1
int column

小部件表示的单元格的列索引。

span

Added in API level 1
int span

小部件跨越的列数。

Public constructors

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (Context c, 
                AttributeSet attrs)

Parameters
c Context
attrs AttributeSet

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (int w, 
                int h)

设置子宽度和子高度。

Parameters
w int: the desired width
h int: the desired height

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (int w, 
                int h, 
                float initWeight)

设置孩子的宽度,高度和体重。

Parameters
w int: the desired width
h int: the desired height
initWeight float: the desired weight

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams ()

将子宽度设置为 ViewGroup.LayoutParams ,将子女高度设置为 WRAP_CONTENT

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (int column)

将视图放在指定的列中。

将子宽度设置为 MATCH_PARENT ,将子女高度设置为 WRAP_CONTENT

Parameters
column int: the column index for the view

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (ViewGroup.LayoutParams p)

Parameters
p ViewGroup.LayoutParams

TableRow.LayoutParams

Added in API level 1
TableRow.LayoutParams (ViewGroup.MarginLayoutParams source)

Parameters
source ViewGroup.MarginLayoutParams

Protected methods

setBaseAttributes

Added in API level 1
void setBaseAttributes (TypedArray a, 
                int widthAttr, 
                int heightAttr)

从提供的属性中提取布局参数。

Parameters
a TypedArray: the style attributes to extract the parameters from
widthAttr int: the identifier of the width attribute
heightAttr int: the identifier of the height attribute

Hooray!