[ Web Proxy ]
URL:
Viewing: http://developer.android.com/reference/android/widget/TableRow.LayoutParams [Back]  [Original]

TableRow.LayoutParams  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

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

Inherited constants

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

Public constructors

LayoutParams()

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

LayoutParams(Context c, AttributeSet attrs)

LayoutParams(ViewGroup.LayoutParams p)

LayoutParams(ViewGroup.MarginLayoutParams source)

LayoutParams(int column)

Puts the view in the specified column.

LayoutParams(int w, int h)

Sets the child width and the child height.

LayoutParams(int w, int h, float initWeight)

Sets the child width, height and weight.

Protected methods

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

Extracts the layout parameters from the supplied attributes.

Inherited methods

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
public int column

The column index of the cell represented by the widget.

span

Added in API level 1
public int span

The number of columns the widgets spans over.

Public constructors

LayoutParams

Added in API level 1
public LayoutParams ()

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

LayoutParams

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

Parameters
c Context

attrs AttributeSet

LayoutParams

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

Parameters
p ViewGroup.LayoutParams

LayoutParams

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

Parameters
source ViewGroup.MarginLayoutParams

LayoutParams

Added in API level 1
public LayoutParams (int column)

Puts the view in the specified column.

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

Parameters
column int: the column index for the view

LayoutParams

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

Sets the child width and the child height.

Parameters
w int: the desired width

h int: the desired height

LayoutParams

Added in API level 1
public 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

Protected methods

setBaseAttributes

Added in API level 1
protected 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

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page