# ActionBar.LayoutParams

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

*** ** * ** ***


```
class ActionBar.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.appcompat.app.ActionBar.LayoutParams](https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.LayoutParams) |

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

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/Toolbar.LayoutParams` | Layout information for child views of Toolbars. |

*** ** * ** ***

Per-child layout information associated with action bar custom views.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.LayoutParams#LayoutParams(int)(gravity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.LayoutParams#LayoutParams(androidx.appcompat.app.ActionBar.LayoutParams)(source: https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.LayoutParams!)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.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/app/ActionBar.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/app/ActionBar.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/appcompat/app/ActionBar.LayoutParams#gravity()` Gravity for the view associated with these LayoutParams. |

| ### 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.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
LayoutParams(gravity: Int)
```

### LayoutParams

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

```
LayoutParams(source: ActionBar.LayoutParams!)
```

### LayoutParams

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

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

### 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, gravity: Int)
```

## Public properties

### gravity

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

```
val gravity: Int
```

Gravity for the view associated with these LayoutParams.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/Gravity.html` |   |