Google is committed to advancing racial equity for Black communities. See how.
Added in API level 1
Deprecated in API level 3

AbsoluteLayout

open class AbsoluteLayout : ViewGroup
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.AbsoluteLayout

A layout that lets you specify exact locations (x/y coordinates) of its children. Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.

XML attributes

See ,

Summary

Nested classes

open

Per-child layout information associated with AbsoluteLayout.

Inherited XML attributes

Inherited constants

Public constructors

<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods

open ViewGroup.LayoutParams!

open Boolean

Protected methods

open Boolean

open ViewGroup.LayoutParams!

Returns a set of layout parameters with a width of android.view.ViewGroup.LayoutParams#WRAP_CONTENT, a height of android.view.ViewGroup.LayoutParams#WRAP_CONTENT and with the coordinates (0, 0).

open ViewGroup.LayoutParams!

open Unit
onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int)

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

Inherited functions

Inherited properties

Public constructors

<init>

Added in API level 1
AbsoluteLayout(context: Context!)

<init>

Added in API level 1
AbsoluteLayout(
    context: Context!,
    attrs: AttributeSet!)

<init>

Added in API level 1
AbsoluteLayout(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int)

<init>

Added in API level 21
AbsoluteLayout(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int,
    defStyleRes: Int)

Public methods

generateLayoutParams

Added in API level 1
Deprecated in API level 3
open fun generateLayoutParams(attrs: AttributeSet!): ViewGroup.LayoutParams!

Deprecated.

Parameters
attrs AttributeSet!: the attributes to build the layout parameters from
Return
ViewGroup.LayoutParams! an instance of android.view.ViewGroup.LayoutParams or one of its descendants

shouldDelayChildPressedState

Added in API level 14
Deprecated in API level 3
open fun shouldDelayChildPressedState(): Boolean

Deprecated.

Protected methods

checkLayoutParams

Added in API level 1
Deprecated in API level 3
protected open fun checkLayoutParams(p: ViewGroup.LayoutParams!): Boolean

Deprecated.

generateDefaultLayoutParams

Added in API level 1
Deprecated in API level 3
protected open fun generateDefaultLayoutParams(): ViewGroup.LayoutParams!

Deprecated.

Returns a set of layout parameters with a width of android.view.ViewGroup.LayoutParams#WRAP_CONTENT, a height of android.view.ViewGroup.LayoutParams#WRAP_CONTENT and with the coordinates (0, 0).

Return
ViewGroup.LayoutParams! a set of default layout parameters or null

generateLayoutParams

Added in API level 1
Deprecated in API level 3
protected open fun generateLayoutParams(p: ViewGroup.LayoutParams!): ViewGroup.LayoutParams!

Deprecated.

Parameters
p ViewGroup.LayoutParams!: The layout parameters to convert into a suitable set of layout parameters for this ViewGroup.
Return
ViewGroup.LayoutParams! an instance of android.view.ViewGroup.LayoutParams or one of its descendants

onLayout

Added in API level 1
Deprecated in API level 3
protected open fun onLayout(
    changed: Boolean,
    l: Int,
    t: Int,
    r: Int,
    b: Int
): Unit

Deprecated.

Parameters
changed Boolean: This is a new size or position for this view
left Left position, relative to parent
top Top position, relative to parent
right Right position, relative to parent
bottom Bottom position, relative to parent

onMeasure

Added in API level 1
Deprecated in API level 3
protected open fun onMeasure(
    widthMeasureSpec: Int,
    heightMeasureSpec: Int
): Unit

Deprecated.

Parameters
widthMeasureSpec Int: horizontal space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.
heightMeasureSpec Int: vertical space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.