Skip to content

Most visited

Recently visited

navigation

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


Set of layout parameters used in table rows.

See also:

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

The column index of the cell represented by the widget.

public int span

The number of columns the widgets spans over.

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.

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.

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

android:layout_span

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

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

Fields

column

added in API level 1
int column

The column index of the cell represented by the widget.

span

added in API level 1
int span

The number of columns the widgets spans over.

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)

Sets the child width and the child height.

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)

Sets the child width, height and weight.

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 ()

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

TableRow.LayoutParams

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

Puts the view in the specified column.

Sets the child width to MATCH_PARENT and the child height to 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)

Extracts the layout parameters from the supplied attributes.

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

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)