Added in API level 1

LayoutParams


open class LayoutParams : LinearLayout.LayoutParams
kotlin.Any
   ↳ android.view.ViewGroup.LayoutParams
   ↳ android.view.ViewGroup.MarginLayoutParams
   ↳ android.widget.LinearLayout.LayoutParams
   ↳ android.widget.TableRow.LayoutParams

Set of layout parameters used in table rows.

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
Public constructors

Sets the child width to android.view.ViewGroup.LayoutParams and the child height to android.view.ViewGroup.LayoutParams#WRAP_CONTENT.

LayoutParams(column: Int)

Puts the view in the specified column.

LayoutParams(w: Int, h: Int)

Sets the child width and the child height.

LayoutParams(w: Int, h: Int, initWeight: Float)

Sets the child width, height and weight.

Protected methods
open Unit
setBaseAttributes(a: TypedArray!, widthAttr: Int, heightAttr: Int)

Inherited functions
Properties
Int

The column index of the cell represented by the widget.

Int

The number of columns the widgets spans over.

Inherited properties

XML attributes

android:layout_column

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

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

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

Public constructors

LayoutParams

Added in API level 1
LayoutParams()

Sets the child width to android.view.ViewGroup.LayoutParams and the child height to android.view.ViewGroup.LayoutParams#WRAP_CONTENT.

LayoutParams

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

LayoutParams

Added in API level 1
LayoutParams(p: ViewGroup.LayoutParams!)

LayoutParams

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

LayoutParams

Added in API level 1
LayoutParams(column: Int)

Puts the view in the specified column.

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

Parameters
column Int: the column index for the view

LayoutParams

Added in API level 1
LayoutParams(
    w: Int,
    h: Int)

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
LayoutParams(
    w: Int,
    h: Int,
    initWeight: Float)

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 open fun setBaseAttributes(
    a: TypedArray!,
    widthAttr: Int,
    heightAttr: Int
): Unit
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

Properties

column

Added in API level 1
var column: Int

The column index of the cell represented by the widget.

span

Added in API level 1
var span: Int

The number of columns the widgets spans over.