# PercentRelativeLayout.LayoutParams

Artifact: [androidx.percentlayout:percentlayout](https://developer.android.com/jetpack/androidx/releases/percentlayout) [View Source](https://cs.android.com/search?q=file:androidx/percentlayout/widget/PercentRelativeLayout.java+class:androidx.percentlayout.widget.PercentRelativeLayout.LayoutParams) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0)

*** ** * ** ***


```
class PercentRelativeLayout.LayoutParams : RelativeLayout.LayoutParams, PercentLayoutHelper.PercentLayoutParams
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) ||||
|   | ↳ | [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) |||
|   |   | ↳ | [android.widget.RelativeLayout.LayoutParams](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html) ||
|   |   |   | ↳ | [androidx.percentlayout.widget.PercentRelativeLayout.LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> this class is deprecated along with its parent class.

## Summary

| ### Public constructors |
|---|
| `[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams))(source: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html!)` **This function is deprecated.** Deprecated in Java |
| `[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams))(source: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html!)` **This function is deprecated.** Deprecated in Java |
| `[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet))(c: https://developer.android.com/reference/android/content/Context.html!, attrs: https://developer.android.com/reference/android/util/AttributeSet.html!)` **This function is deprecated.** Deprecated in Java |
| `[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(int,int))(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo!` | `[getPercentLayoutInfo](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#getPercentLayoutInfo())()` **This function is deprecated.** Deprecated in Java |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setBaseAttributes](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#setBaseAttributes(android.content.res.TypedArray,int,int))(a: https://developer.android.com/reference/android/content/res/TypedArray.html!, widthAttr: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, heightAttr: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#FILL_PARENT = -1`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT = -1`

**This property is deprecated.** Deprecated in Java
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT = -2`

**This property is deprecated.** Deprecated in Java

### Inherited functions

From [android.widget.RelativeLayout.LayoutParams](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addRule](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#addRule(int))(verb: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[debug](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#debug(java.lang.String))(output: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getRule](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#getRule(int))(verb: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` `[getRules](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#getRules())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[removeRule](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#removeRule(int))(verb: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[resolveLayoutDirection](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#resolveLayoutDirection(int))(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
From [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getLayoutDirection](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getLayoutDirection())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getMarginEnd](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getMarginStart](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isMarginRelative](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#isMarginRelative())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setLayoutDirection](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setLayoutDirection(int))(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setMarginEnd](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginEnd(int))(end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setMarginStart](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginStart(int))(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setMargins](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int))(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java

### Inherited properties

From [android.widget.RelativeLayout.LayoutParams](https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#alignWithParent`

**This property is deprecated.** Deprecated in Java
From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#height`

**This property is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html!` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#layoutAnimationParameters`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#width`

**This property is deprecated.** Deprecated in Java
From [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#bottomMargin`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#leftMargin`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#rightMargin`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#topMargin`

**This property is deprecated.** Deprecated in Java

## Public constructors

### LayoutParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0)

```
[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams))(source: ViewGroup.LayoutParams!)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

### LayoutParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0)

```
[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams))(source: ViewGroup.MarginLayoutParams!)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

### LayoutParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0)

```
[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet))(c: Context!, attrs: AttributeSet!)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

### LayoutParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.0.0)

```
[LayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#LayoutParams(int,int))(width: Int, height: Int)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

## Public functions

### getPercentLayoutInfo

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.1.0-alpha01) Deprecated in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/percentlayout#1.1.0-alpha01)

```
fun [getPercentLayoutInfo](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#getPercentLayoutInfo())(): PercentLayoutHelper.PercentLayoutInfo!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

## Protected functions

### setBaseAttributes

```
protected fun [setBaseAttributes](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentRelativeLayout.LayoutParams#setBaseAttributes(android.content.res.TypedArray,int,int))(a: TypedArray!, widthAttr: Int, heightAttr: Int): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java