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.RadioGroup.LayoutParams

This set of layout parameters defaults the width and the height of the children to WRAP_CONTENT when they are not specified in the XML file. Otherwise, this class ussed the value read from the XML file.

See LinearLayout Attributes for a list of all child view attributes that this class supports.

Summary

Inherited XML attributes
Inherited constants
Public constructors

LayoutParams(w: Int, h: Int)

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

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

Fixes the child's width to android.view.ViewGroup.LayoutParams#WRAP_CONTENT and the child's height to android.view.ViewGroup.LayoutParams#WRAP_CONTENT when not specified in the XML file.

Inherited functions
Inherited properties

Public constructors

LayoutParams

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

LayoutParams

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

LayoutParams

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

LayoutParams

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

LayoutParams

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

Protected methods

setBaseAttributes

Added in API level 1
protected open fun setBaseAttributes(
    a: TypedArray!,
    widthAttr: Int,
    heightAttr: Int
): Unit

Fixes the child's width to android.view.ViewGroup.LayoutParams#WRAP_CONTENT and the child's height to android.view.ViewGroup.LayoutParams#WRAP_CONTENT when not specified in the XML file.

Parameters
a TypedArray!: the styled attributes set
widthAttr Int: the width attribute to fetch
heightAttr Int: the height attribute to fetch