# PercentLayoutHelper.PercentLayoutInfo

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:percent:28.0.0-alpha1  
Deprecated since version 26.1.0  
Summary:[Fields](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#lfields)\|[Ctors](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#pubctors)\|[Methods](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#)  

# PercentLayoutHelper.PercentLayoutInfo

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
PercentLayoutHelper.PercentLayoutInfo
`  
`

extends Object


``


`

|---|---------------------------------------------------------------|
| java.lang.Object                                                 ||
| ↳ | android.support.percent.PercentLayoutHelper.PercentLayoutInfo |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 26.1.0.**   
use ConstraintLayout and Guidelines for layout support.

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

## Summary

|                                                                                                         ### Fields                                                                                                         ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public float` | [aspectRatio](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#aspectRatio) The decimal value of the percentage-based aspect ratio.                  |
| ` public float` | [bottomMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#bottomMarginPercent) The decimal value of the percentage-based bottom margin. |
| ` public float` | [endMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#endMarginPercent) The decimal value of the percentage-based end margin.          |
| ` public float` | [heightPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#heightPercent) The decimal value of the percentage-based height.                    |
| ` public float` | [leftMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#leftMarginPercent) The decimal value of the percentage-based left margin.       |
| ` public float` | [rightMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#rightMarginPercent) The decimal value of the percentage-based right margin.    |
| ` public float` | [startMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#startMarginPercent) The decimal value of the percentage-based start margin.    |
| ` public float` | [topMarginPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#topMarginPercent) The decimal value of the percentage-based top margin.          |
| ` public float` | [widthPercent](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#widthPercent) The decimal value of the percentage-based width.                       |

|                                                                                      ### Public constructors                                                                                      ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PercentLayoutHelper.PercentLayoutInfo](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#PercentLayoutHelper.PercentLayoutInfo())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                        ||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`   | ` `[fillLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#fillLayoutParams(android.view.ViewGroup.LayoutParams, int, int))`(`[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` params, int widthHint, int heightHint) ` Fills the[width](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#width)and[height](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#height)fields of the passed[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)object based on currently set percentage values.                                                                       |
| ` void`   | ` `[fillMarginLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View, android.view.ViewGroup.MarginLayoutParams, int, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` params, int widthHint, int heightHint) ` Fills the margin fields of the passed[ViewGroup.MarginLayoutParams](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[View](https://developer.android.com/reference/android/view/View.html). |
| ` void`   | ` `[fillMarginLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams, int, int))`(`[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` params, int widthHint, int heightHint) ` *This method was deprecated in API level 24.1.0. Use[fillMarginLayoutParams(View, ViewGroup.MarginLayoutParams, int, int)](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View, android.view.ViewGroup.MarginLayoutParams, int, int))for proper RTL support.*                                                                           |
| ` void`   | ` `[restoreLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#restoreLayoutParams(android.view.ViewGroup.LayoutParams))`(`[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` params) ` Restores original dimensions after they were changed for percentage based values.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`   | ` `[restoreMarginLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#restoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams))`(`[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` params) ` Restores the original dimensions and margins after they were changed for percentage based values.                                                                                                                                                                                                                                                                                                                                                                     |
| ` String` | ` `[toString](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#toString())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Fields

### aspectRatio

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float aspectRatio
```

The decimal value of the percentage-based aspect ratio.

<br />

### bottomMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float bottomMarginPercent
```

The decimal value of the percentage-based bottom margin.

<br />

### endMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float endMarginPercent
```

The decimal value of the percentage-based end margin.

<br />

### heightPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float heightPercent
```

The decimal value of the percentage-based height.

<br />

### leftMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float leftMarginPercent
```

The decimal value of the percentage-based left margin.

<br />

### rightMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float rightMarginPercent
```

The decimal value of the percentage-based right margin.

<br />

### startMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float startMarginPercent
```

The decimal value of the percentage-based start margin.

<br />

### topMarginPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float topMarginPercent
```

The decimal value of the percentage-based top margin.

<br />

### widthPercent

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float widthPercent
```

The decimal value of the percentage-based width.

<br />

## Public constructors

### PercentLayoutHelper.PercentLayoutInfo

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PercentLayoutHelper.PercentLayoutInfo ()
```

<br />

<br />

## Public methods

### fillLayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void fillLayoutParams (ViewGroup.LayoutParams params, 
                int widthHint, 
                int heightHint)
```

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

<br />

|                  Parameters                   ||
|--------------|---------------------------------|
| `params`     | `ViewGroup.LayoutParams` <br /> |
| `widthHint`  | `int` <br />                    |
| `heightHint` | `int` <br />                    |

### fillMarginLayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void fillMarginLayoutParams (View view, 
                ViewGroup.MarginLayoutParams params, 
                int widthHint, 
                int heightHint)
```

Fills the margin fields of the passed[ViewGroup.MarginLayoutParams](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[View](https://developer.android.com/reference/android/view/View.html).

<br />

|                     Parameters                      ||
|--------------|---------------------------------------|
| `view`       | `View` <br />                         |
| `params`     | `ViewGroup.MarginLayoutParams` <br /> |
| `widthHint`  | `int` <br />                          |
| `heightHint` | `int` <br />                          |

### fillMarginLayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void fillMarginLayoutParams (ViewGroup.MarginLayoutParams params, 
                int widthHint, 
                int heightHint)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Use[fillMarginLayoutParams(View, ViewGroup.MarginLayoutParams, int, int)](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams(android.view.View, android.view.ViewGroup.MarginLayoutParams, int, int))for proper RTL support.

<br />

<br />

|                     Parameters                      ||
|--------------|---------------------------------------|
| `params`     | `ViewGroup.MarginLayoutParams` <br /> |
| `widthHint`  | `int` <br />                          |
| `heightHint` | `int` <br />                          |

### restoreLayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void restoreLayoutParams (ViewGroup.LayoutParams params)
```

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

<br />

|                Parameters                 ||
|----------|---------------------------------|
| `params` | `ViewGroup.LayoutParams` <br /> |

### restoreMarginLayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void restoreMarginLayoutParams (ViewGroup.MarginLayoutParams params)
```

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

<br />

|                   Parameters                    ||
|----------|---------------------------------------|
| `params` | `ViewGroup.MarginLayoutParams` <br /> |

### toString

```
String toString ()
```

<br />

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

-

  ## Interfaces

  - [PercentLayoutHelper.PercentLayoutParams](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutParams)
-

  ## Classes

  - [PercentFrameLayout](https://developer.android.com/reference/android/support/percent/PercentFrameLayout)
  - [PercentFrameLayout.LayoutParams](https://developer.android.com/reference/android/support/percent/PercentFrameLayout.LayoutParams)
  - [PercentLayoutHelper](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper)
  - [PercentLayoutHelper.PercentLayoutInfo](https://developer.android.com/reference/android/support/percent/PercentLayoutHelper.PercentLayoutInfo)
  - [PercentRelativeLayout](https://developer.android.com/reference/android/support/percent/PercentRelativeLayout)
  - [PercentRelativeLayout.LayoutParams](https://developer.android.com/reference/android/support/percent/PercentRelativeLayout.LayoutParams)
  - [R](https://developer.android.com/reference/android/support/percent/R)
  - [R.attr](https://developer.android.com/reference/android/support/percent/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/percent/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/percent/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/percent/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/percent/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/percent/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/percent/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/percent/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/percent/R.string)
  - [R.style](https://developer.android.com/reference/android/support/percent/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/percent/R.styleable)