# PercentLayoutHelper.PercentLayoutInfo

Artifact: [androidx.percentlayout:percentlayout](https://developer.android.com/jetpack/androidx/releases/percentlayout) [View Source](https://cs.android.com/search?q=file:androidx/percentlayout/widget/PercentLayoutHelper.java+class:androidx.percentlayout.widget.PercentLayoutHelper.PercentLayoutInfo) 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 PercentLayoutHelper.PercentLayoutInfo
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> use ConstraintLayout and Guidelines for layout support.

Container for information about percentage dimensions and margins. It acts as an extension for `LayoutParams`.

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[fillLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillLayoutParams(android.view.ViewGroup.LayoutParams,int,int))( params: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html!, widthHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, heightHint: 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` | `[fillMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams,int,int))( params: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html!, widthHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, heightHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View,android.view.ViewGroup.MarginLayoutParams,int,int)` for proper RTL support. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[fillMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View,android.view.ViewGroup.MarginLayoutParams,int,int))( view: https://developer.android.com/reference/android/view/View.html!, params: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html!, widthHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, heightHint: 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` | `[restoreLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#restoreLayoutParams(android.view.ViewGroup.LayoutParams))(params: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[restoreMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#restoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams))(params: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `[toString](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#toString())()` **This function is deprecated.** Deprecated in Java |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#aspectRatio()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#bottomMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#endMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#heightPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#leftMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#rightMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#startMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#topMarginPercent()` **This property is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#widthPercent()` **This property is deprecated.** Deprecated in Java |

## Public constructors

### PercentLayoutInfo

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)

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

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

## Public functions

### fillLayoutParams

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)

```
fun [fillLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillLayoutParams(android.view.ViewGroup.LayoutParams,int,int))(
    params: ViewGroup.LayoutParams!,
    widthHint: Int,
    heightHint: Int
): Unit
```

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

Fills the `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#width` and `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#height` fields of the passed `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` object based on currently set percentage values.

### fillMarginLayoutParams

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)

```
fun [fillMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams,int,int))(
    params: ViewGroup.MarginLayoutParams!,
    widthHint: Int,
    heightHint: Int
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View,android.view.ViewGroup.MarginLayoutParams,int,int)` for proper RTL support.

### fillMarginLayoutParams

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)

```
fun [fillMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View,android.view.ViewGroup.MarginLayoutParams,int,int))(
    view: View!,
    params: ViewGroup.MarginLayoutParams!,
    widthHint: Int,
    heightHint: Int
): Unit
```

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

Fills the margin fields of the passed `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` object based on currently set percentage values and the current layout direction of the passed `https://developer.android.com/reference/android/view/View.html`.

### restoreLayoutParams

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)

```
fun [restoreLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#restoreLayoutParams(android.view.ViewGroup.LayoutParams))(params: ViewGroup.LayoutParams!): Unit
```

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

Restores original dimensions after they were changed for percentage based values. You should call this method only if you previously called `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillLayoutParams(android.view.ViewGroup.LayoutParams,int,int)`.

### restoreMarginLayoutParams

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)

```
fun [restoreMarginLayoutParams](https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#restoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams))(params: ViewGroup.MarginLayoutParams!): Unit
```

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

Restores the original dimensions and margins after they were changed for percentage based values. You should call this method only if you previously called `https://developer.android.com/reference/kotlin/androidx/percentlayout/widget/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View,android.view.ViewGroup.MarginLayoutParams,int,int)`.

### toString

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

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

## Public properties

### aspectRatio

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)

```
val aspectRatio: Float
```

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

The decimal value of the percentage-based aspect ratio.

### bottomMarginPercent

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)

```
val bottomMarginPercent: Float
```

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

The decimal value of the percentage-based bottom margin.

### endMarginPercent

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)

```
val endMarginPercent: Float
```

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

The decimal value of the percentage-based end margin.

### heightPercent

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)

```
val heightPercent: Float
```

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

The decimal value of the percentage-based height.

### leftMarginPercent

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)

```
val leftMarginPercent: Float
```

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

The decimal value of the percentage-based left margin.

### rightMarginPercent

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)

```
val rightMarginPercent: Float
```

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

The decimal value of the percentage-based right margin.

### startMarginPercent

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)

```
val startMarginPercent: Float
```

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

The decimal value of the percentage-based start margin.

### topMarginPercent

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)

```
val topMarginPercent: Float
```

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

The decimal value of the percentage-based top margin.

### widthPercent

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)

```
val widthPercent: Float
```

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

The decimal value of the percentage-based width.