to top
Android APIs
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

Class Overview

Set of layout parameters used in table rows.

Summary

XML Attributes
Attribute Name Related Method Description
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. 
[Expand]
Inherited XML Attributes
From class android.widget.LinearLayout.LayoutParams
From class android.view.ViewGroup.MarginLayoutParams
From class android.view.ViewGroup.LayoutParams
[Expand]
Inherited Constants
From class android.view.ViewGroup.LayoutParams
Fields
public int column

The column index of the cell represented by the widget.

public int span

The number of columns the widgets spans over.

[Expand]
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)

Sets the child width and the child height.

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

Sets the child width, height and weight.

TableRow.LayoutParams()

Sets the child width to ViewGroup.LayoutParams and the child height to WRAP_CONTENT.

TableRow.LayoutParams(int column)

Puts the view in the specified column.

TableRow.LayoutParams(ViewGroup.LayoutParams p)
TableRow.LayoutParams(ViewGroup.MarginLayoutParams source)
Protected Methods
void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)
Extracts the layout parameters from the supplied attributes.
[Expand]
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

The index of the column in which this child should be.

Must be an integer value, such as "100".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol layout_column.

Related Methods

android:layout_span

Defines how many columns this child should span. Must be >= 1.

Must be an integer value, such as "100".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol layout_span.

Related Methods

Fields

public int column

Added in API level 1

The column index of the cell represented by the widget.

public int span

Added in API level 1

The number of columns the widgets spans over.

Public Constructors

public TableRow.LayoutParams (Context c, AttributeSet attrs)

Added in API level 1

public TableRow.LayoutParams (int w, int h)

Added in API level 1

Sets the child width and the child height.

Parameters
w the desired width
h the desired height

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

Added in API level 1

Sets the child width, height and weight.

Parameters
w the desired width
h the desired height
initWeight the desired weight

public TableRow.LayoutParams ()

Added in API level 1

Sets the child width to ViewGroup.LayoutParams and the child height to WRAP_CONTENT.

public TableRow.LayoutParams (int column)

Added in API level 1

Puts the view in the specified column.

Sets the child width to MATCH_PARENT and the child height to WRAP_CONTENT.

Parameters
column the column index for the view

public TableRow.LayoutParams (ViewGroup.LayoutParams p)

Added in API level 1

public TableRow.LayoutParams (ViewGroup.MarginLayoutParams source)

Added in API level 1

Protected Methods

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

Added in API level 1

Extracts the layout parameters from the supplied attributes.

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