# DrawerLayout.LayoutParams

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

*** ** * ** ***


```
class DrawerLayout.LayoutParams : ViewGroup.MarginLayoutParams
```

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

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.LayoutParams#LayoutParams(androidx.drawerlayout.widget.DrawerLayout.LayoutParams)(source: https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.LayoutParams)` |
| `https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` |
| `https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` |
| `https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.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/drawerlayout/widget/DrawerLayout.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/drawerlayout/widget/DrawerLayout.LayoutParams#LayoutParams(int,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, gravity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/drawerlayout/widget/DrawerLayout.LayoutParams#gravity()` |

### 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.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.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.0.0](https://developer.android.com/jetpack/androidx/releases/drawerlayout#1.0.0)

```
LayoutParams(source: DrawerLayout.LayoutParams)
```

### LayoutParams

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

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

### LayoutParams

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

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

### LayoutParams

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

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

### LayoutParams

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

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

### LayoutParams

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

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

## Public properties

### gravity

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

```
val gravity: Int
```

Value is either `0` or a combination of the following:

- `Gravity.LEFT`
- `Gravity.RIGHT`
- `GravityCompat.START`
- `GravityCompat.END`
- `Gravity.NO_GRAVITY`

<br />