# AbsoluteLayout.LayoutParams

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# LayoutParams

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/widget/AbsoluteLayout.LayoutParams "View this page in Java")  

```
open class LayoutParams : ViewGroup.LayoutParams
```

|---|---|------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                              |||
| ↳ | [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#)             ||
|   | ↳ | [android.widget.AbsoluteLayout.LayoutParams](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#) |

*** ** * ** ***

| **This class was deprecated in API level 29.**
|
| Deprecated in Java.

Per-child layout information associated with AbsoluteLayout. See[Absolute Layout Attributes](https://developer.android.com/reference/kotlin/android/R.styleable.html#AbsoluteLayout_Layout:kotlin.IntArray)for a list of all child view attributes that this class supports.

## Summary

| Inherited XML attributes ||
|---|---|
| From class[LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#) |------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [android:layout_height](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#attr_LayoutParams) | Specifies the basic height of the view. This is a required attribute for any view inside of a containing layout manager. Its value may be a dimension (such as "12dip") for a constant height or one of the special constants. May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters). Must be one of the following constant values. |   Constant   |  Value   |                                                                   Description                                                                    | |--------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------| | fill_parent  | ffffffff | The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by`match_parent`. | | match_parent | ffffffff | The view should be as big as its parent (minus padding). Introduced in API Level 8.                                                              | | wrap_content | fffffffe | The view should be only big enough to enclose its content (plus padding).                                                                        | <br /> | | [android:layout_width](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#attr_LayoutParams)  | Specifies the basic width of the view. This is a required attribute for any view inside of a containing layout manager. Its value may be a dimension (such as "12dip") for a constant width or one of the special constants. May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters). Must be one of the following constant values. |   Constant   |  Value   |                                                                   Description                                                                    | |--------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------| | fill_parent  | ffffffff | The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by`match_parent`. | | match_parent | ffffffff | The view should be as big as its parent (minus padding). Introduced in API Level 8.                                                              | | wrap_content | fffffffe | The view should be only big enough to enclose its content (plus padding).                                                                        | <br />   | ||

| Inherited constants ||
|---|---|
| From class[LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [FILL_PARENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#FILL_PARENT:kotlin.Int) <br /> Special value for the height or width requested by a View. FILL_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any. This value is deprecated starting in API Level 8 and replaced by[MATCH_PARENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT:kotlin.Int). <br /> | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MATCH_PARENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT:kotlin.Int) <br /> Special value for the height or width requested by a View. MATCH_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any. Introduced in API Level 8. <br />                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [WRAP_CONTENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT:kotlin.Int) <br /> Special value for the height or width requested by a View. WRAP_CONTENT means that the view wants to be just large enough to fit its own internal content, taking its own padding into account. <br />                                                                                                                                                                 | ||

|                                                                                                                                                                                                                                                                                                     Public constructors                                                                                                                                                                                                                                                                                                      ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [LayoutParams](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#LayoutParams(android.content.Context,%20android.util.AttributeSet))`(`c:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `attrs:` `[AttributeSet](https://developer.android.com/reference/kotlin/android/util/AttributeSet.html#)!`)` Creates a new set of layout parameters.                                                                                                                                                                                       |
| [LayoutParams](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams))`(`source:` `[ViewGroup.LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                     |
| [LayoutParams](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#LayoutParams(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`width:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `height:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `x:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `y:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates a new set of layout parameters with the specified width, height and location. |

|                                                                                                                                                     Public methods                                                                                                                                                     ||
|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [debug](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#debug(kotlin.String))`(`output:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> |

| Inherited functions ||
|---|---|
| From class[LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [resolveLayoutDirection](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#resolveLayoutDirection(kotlin.Int))`(`layoutDirection:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Resolve layout parameters depending on the layout direction. Subclasses that care about layoutDirection changes should override this method. The default implementation does nothing. <br />                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [setBaseAttributes](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#setBaseAttributes(android.content.res.TypedArray,%20kotlin.Int,%20kotlin.Int))`(`a:` `[TypedArray](https://developer.android.com/reference/kotlin/android/content/res/TypedArray.html#)!`, `widthAttr:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `heightAttr:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Extracts the layout parameters from the supplied attributes. <br /> | ||

|                                                                                                                         Properties                                                                                                                         ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [x](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#x:kotlin.Int) The horizontal, or X, location of the child within the view group. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [y](https://developer.android.com/reference/kotlin/android/widget/AbsoluteLayout.LayoutParams#y:kotlin.Int) The vertical, or Y, location of the child within the view group.   |

| Inherited properties ||
|---|---|
| From class[LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#) |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                  | [height](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#height:kotlin.Int) <br /> Information about how tall the view wants to be. Can be one of the constants FILL_PARENT (replaced by MATCH_PARENT in API Level 8) or WRAP_CONTENT, or an exact size. <br /> | | [LayoutAnimationController.AnimationParameters](https://developer.android.com/reference/kotlin/android/view/animation/LayoutAnimationController.AnimationParameters.html#)! | [layoutAnimationParameters](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#layoutAnimationParameters:android.view.animation.LayoutAnimationController.AnimationParameters) <br /> Used to animate layouts. <br />                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                  | [width](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#width:kotlin.Int) <br /> Information about how wide the view wants to be. Can be one of the constants FILL_PARENT (replaced by MATCH_PARENT in API Level 8) or WRAP_CONTENT, or an exact size. <br />   | ||

## Public constructors

### LayoutParams

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
LayoutParams(
    c: Context!, 
    attrs: AttributeSet!)
```

Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context. The XML attributes mapped to this set of layout parameters are:

- `layout_x`: the X location of the child
- `layout_y`: the Y location of the child
- All the XML attributes from[android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#)

<br />

|                                                                                    Parameters                                                                                     ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `c`     | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:the application environment                                                     |
| `attrs` | [AttributeSet](https://developer.android.com/reference/kotlin/android/util/AttributeSet.html#)!:the set of attributes from which to extract the layout parameters values |

### LayoutParams

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
LayoutParams(source: ViewGroup.LayoutParams!)
```  

### LayoutParams

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
LayoutParams(
    width: Int, 
    height: Int, 
    x: Int, 
    y: Int)
```

Creates a new set of layout parameters with the specified width, height and location.

|                                                                                                                                                                                           Parameters                                                                                                                                                                                            ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `width`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the width, either[MATCH_PARENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT:kotlin.Int),[WRAP_CONTENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT:kotlin.Int)or a fixed size in pixels  |
| `height` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the height, either[MATCH_PARENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT:kotlin.Int),[WRAP_CONTENT](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT:kotlin.Int)or a fixed size in pixels |
| `x`      | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the X location of the child                                                                                                                                                                                                                                                                                |
| `y`      | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the Y location of the child                                                                                                                                                                                                                                                                                |

## Public methods

### debug

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun debug(output: String!): String!
```

**Deprecated:** *Deprecated in Java.*

## Properties

### x

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var x: Int
```

**Deprecated:** *Deprecated in Java.*

The horizontal, or X, location of the child within the view group.  

### y

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var y: Int
```

**Deprecated:** *Deprecated in Java.*

The vertical, or Y, location of the child within the view group.