public static class TableLayout.Constraint

  1. Object
  2. TableLayout.Constraint
Represents the layout constraint for an entry within the table indicating the desired position/behavior of the component.

Constructors

public Constraint()

Methods

public String toString()Returns a string representation of the object.
public TableLayout.Constraint verticalSpan(int span)Sets the cells to span vertically, this number must never be smaller than 1
public TableLayout.Constraint vs(int span)Sets the cells to span vertically, this number must never be smaller than 1
public TableLayout.Constraint horizontalSpan(int span)Sets the cells to span horizontally, this number must never be smaller than 1
public TableLayout.Constraint hs(int span)Sets the cells to span horizontally, this number must never be smaller than 1
public TableLayout.Constraint widthPercentage(int width)Sets the column width based on percentage of the parent
public TableLayout.Constraint wp(int width)Sets the column width based on percentage of the parent
public TableLayout.Constraint heightPercentage(int height)Sets the row height based on percentage of the parent
public TableLayout.Constraint hp(int height)Sets the row height based on percentage of the parent
public TableLayout.Constraint horizontalAlign(int align)Sets the horizontal alignment of the table cell
public TableLayout.Constraint ha(int align)Sets the horizontal alignment of the table cell
public TableLayout.Constraint verticalAlign(int valign)Sets the vertical alignment of the table cell
public TableLayout.Constraint va(int valign)Sets the vertical alignment of the table cell
public int getRow()
public int getColumn()
public int getWidthPercentage()
public void setWidthPercentage(int width)Sets the column width based on percentage of the parent
public int getHeightPercentage()
public void setHeightPercentage(int height)Sets the row height based on percentage of the parent
public int getHorizontalSpan()
public void setHorizontalSpan(int span)Sets the cells to span horizontally, this number must never be smaller than 1
public int getVerticalSpan()
public void setVerticalSpan(int span)Sets the cells to span vertically, this number must never be smaller than 1
public int getHorizontalAlign()
public void setHorizontalAlign(int align)Sets the horizontal alignment of the table cell
public int getVerticalAlign()
public void setVerticalAlign(int valign)Sets the vertical alignment of the table cell

Inherited methods

Constructor details

Constraint

public Constraint()

Method details

toString

public String toString()
Returns a string representation of the object. In general, the toString method returns a string that “textually represents” this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + ‘@’ + Integer.toHexString(hashCode())

verticalSpan

public TableLayout.Constraint verticalSpan(int span)
Sets the cells to span vertically, this number must never be smaller than 1

Parameters

span int
a number larger than 1

Returns

this

vs

public TableLayout.Constraint vs(int span)
Sets the cells to span vertically, this number must never be smaller than 1

Parameters

span int
a number larger than 1

Returns

this

horizontalSpan

public TableLayout.Constraint horizontalSpan(int span)
Sets the cells to span horizontally, this number must never be smaller than 1

Parameters

span int
a number larger than 1

hs

public TableLayout.Constraint hs(int span)
Sets the cells to span horizontally, this number must never be smaller than 1

Parameters

span int
a number larger than 1

widthPercentage

public TableLayout.Constraint widthPercentage(int width)
Sets the column width based on percentage of the parent

Parameters

width int
negative number indicates ignoring this member

wp

public TableLayout.Constraint wp(int width)
Sets the column width based on percentage of the parent

Parameters

width int
negative number indicates ignoring this member

heightPercentage

public TableLayout.Constraint heightPercentage(int height)
Sets the row height based on percentage of the parent

Parameters

height int
negative number indicates ignoring this member

hp

public TableLayout.Constraint hp(int height)
Sets the row height based on percentage of the parent

Parameters

height int
negative number indicates ignoring this member

horizontalAlign

public TableLayout.Constraint horizontalAlign(int align)
Sets the horizontal alignment of the table cell

Parameters

align int
Component.LEFT/RIGHT/CENTER

ha

public TableLayout.Constraint ha(int align)
Sets the horizontal alignment of the table cell

Parameters

align int
Component.LEFT/RIGHT/CENTER

verticalAlign

public TableLayout.Constraint verticalAlign(int valign)
Sets the vertical alignment of the table cell

Parameters

valign int
Component.TOP/BOTTOM/CENTER

va

public TableLayout.Constraint va(int valign)
Sets the vertical alignment of the table cell

Parameters

valign int
Component.TOP/BOTTOM/CENTER

getRow

public int getRow()

Returns

the row

getColumn

public int getColumn()

Returns

the column

getWidthPercentage

public int getWidthPercentage()

Returns

the width

setWidthPercentage

public void setWidthPercentage(int width)
Sets the column width based on percentage of the parent

Parameters

width int
negative number indicates ignoring this member

getHeightPercentage

public int getHeightPercentage()

Returns

the height

setHeightPercentage

public void setHeightPercentage(int height)
Sets the row height based on percentage of the parent

Parameters

height int
negative number indicates ignoring this member

getHorizontalSpan

public int getHorizontalSpan()

Returns

the spanHorizontal

setHorizontalSpan

public void setHorizontalSpan(int span)
Sets the cells to span horizontally, this number must never be smaller than 1

Parameters

span int
a number larger than 1

getVerticalSpan

public int getVerticalSpan()

Returns

the spanVertical

setVerticalSpan

public void setVerticalSpan(int span)
Sets the cells to span vertically, this number must never be smaller than 1

Parameters

span int
a number larger than 1

getHorizontalAlign

public int getHorizontalAlign()

Returns

the align

setHorizontalAlign

public void setHorizontalAlign(int align)
Sets the horizontal alignment of the table cell

Parameters

align int
Component.LEFT/RIGHT/CENTER

getVerticalAlign

public int getVerticalAlign()

Returns

the valign

setVerticalAlign

public void setVerticalAlign(int valign)
Sets the vertical alignment of the table cell

Parameters

valign int
Component.TOP/BOTTOM/CENTER