# LinearLayoutCompat.LayoutParams

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

*** ** * ** ***


```
class LinearLayoutCompat.LayoutParams : LinearLayout.LayoutParams
```

<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.LinearLayout.LayoutParams](https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html) ||
|   |   |   | ↳ | [androidx.appcompat.widget.LinearLayoutCompat.LayoutParams](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.LayoutParams) |

Known direct subclasses [ActionMenuView.LayoutParams](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/ActionMenuView.LayoutParams)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/ActionMenuView.LayoutParams` |   |

*** ** * ** ***

Per-child layout information associated with ViewLinearLayout.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(p: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.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!)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.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)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/LinearLayoutCompat.LayoutParams#LayoutParams(int,int,float)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Creates a new set of layout parameters with the specified width, height and weight. |

| ### 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` | | `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` | |

| ### Inherited functions |
|---|
| From [android.widget.LinearLayout.LayoutParams](https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#debug(java.lang.String)(output: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` | |
| From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#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)` | |
| 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#getLayoutDirection()()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd()()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart()()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#isMarginRelative()()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#resolveLayoutDirection(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setLayoutDirection(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginEnd(int)(end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginStart(int)(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `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)` | |

| ### Inherited properties |
|---|
| From [android.widget.LinearLayout.LayoutParams](https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#gravity` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#weight` | |
| 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` | | `https://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html!` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#layoutAnimationParameters` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#width` | |
| 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` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#leftMargin` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#rightMargin` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#topMargin` | |

## Public constructors

### LayoutParams

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

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

### LayoutParams

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

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

### LayoutParams

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

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

### LayoutParams

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

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

### LayoutParams

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
LayoutParams(width: Int, height: Int, weight: Float)
```

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

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the width, either `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT`, `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT` or a fixed size in pixels |
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the height, either `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT`, `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT` or a fixed size in pixels |
| `weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the weight |