# ActionBar.LayoutParams

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1  
Summary:[Inherited Constants](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#inhconstants)\|[Fields](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#lfields)\|[Inherited Fields](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#inhfields)\|[Ctors](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#pubctors)\|[Inherited Methods](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)  

# ActionBar.LayoutParams

| 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
ActionBar.LayoutParams
`  
`


``


``

extends `[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)`


``


`

|---|---|---|-----------------------------------------------|
| java.lang.Object                                       ||||
| ↳ | [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.support.v7.app.ActionBar.LayoutParams |

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)Known Direct Subclasses [Toolbar.LayoutParams](https://developer.android.com/reference/android/support/v7/widget/Toolbar.LayoutParams) |----------------------------------------------------------------------------------------------------------------|-------------------------------------------------| | [Toolbar.LayoutParams](https://developer.android.com/reference/android/support/v7/widget/Toolbar.LayoutParams) | Layout information for child views of Toolbars. | |

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                        ### Inherited constants                                                                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)From class` android.view.ViewGroup.LayoutParams ` |-------|-----------------------| | `int` | `FILL_PARENT` <br />  | | `int` | `MATCH_PARENT` <br /> | | `int` | `WRAP_CONTENT` <br /> | |

|                                                                                    ### Fields                                                                                    ||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public int` | [gravity](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#gravity) Gravity for the view associated with these LayoutParams. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ### Inherited fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)From class` android.view.ViewGroup.MarginLayoutParams ` |---------------|-----------------------| | ` public int` | `bottomMargin` <br /> | | ` public int` | `leftMargin` <br />   | | ` public int` | `rightMargin` <br />  | | ` public int` | `topMargin` <br />    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)From class` android.view.ViewGroup.LayoutParams ` |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| | ` public int`                                                                                                                                                                | `height` <br />                    | | ` public `[LayoutAnimationController.AnimationParameters](https://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html) | `layoutAnimationParameters` <br /> | | ` public int`                                                                                                                                                                | `width` <br />                     | |

|                                                                                                                                                                                 ### Public constructors                                                                                                                                                                                  ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(android.content.Context, android.util.AttributeSet))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` c, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs) ` |
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(int, int))`(int width, int height) `                                                                                                                                                                                                         |
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(int, int, int))`(int width, int height, int gravity) `                                                                                                                                                                                       |
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(int))`(int gravity) `                                                                                                                                                                                                                        |
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(android.support.v7.app.ActionBar.LayoutParams))`(`[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)` source) `                                                                 |
| ` `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#ActionBar.LayoutParams(android.view.ViewGroup.LayoutParams))`(`[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` source) `                                                                                |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)From class` `[android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` ` |------------|--------------------------------------------------------| | ` int`     | ` getLayoutDirection() `                               | | ` int`     | ` getMarginEnd() `                                     | | ` int`     | ` getMarginStart() `                                   | | ` boolean` | ` isMarginRelative() `                                 | | ` void`    | ` resolveLayoutDirection(int arg0) `                   | | ` void`    | ` setLayoutDirection(int arg0) `                       | | ` void`    | ` setMarginEnd(int arg0) `                             | | ` void`    | ` setMarginStart(int arg0) `                           | | ` void`    | ` setMargins(int arg0, int arg1, int arg2, int arg3) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)From class` `[android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` ` |---------|---------------------------------------------------------------------------------------------------------------------------------------------| | ` void` | ` resolveLayoutDirection(int arg0) `                                                                                                        | | ` void` | ` setBaseAttributes(`[TypedArray](https://developer.android.com/reference/android/content/res/TypedArray.html)` arg0, int arg1, int arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams#)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

### gravity

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

```
int gravity
```

Gravity for the view associated with these LayoutParams.

<br />

**See also:**

- [Gravity](https://developer.android.com/https://developer.android.com/reference/android/view/Gravity)

## Public constructors

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (Context c, 
                AttributeSet attrs)
```

<br />

<br />

|           Parameters           ||
|---------|-----------------------|
| `c`     | `Context` <br />      |
| `attrs` | `AttributeSet` <br /> |

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (int width, 
                int height)
```

<br />

<br />

|       Parameters       ||
|----------|--------------|
| `width`  | `int` <br /> |
| `height` | `int` <br /> |

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (int width, 
                int height, 
                int gravity)
```

<br />

<br />

|       Parameters        ||
|-----------|--------------|
| `width`   | `int` <br /> |
| `height`  | `int` <br /> |
| `gravity` | `int` <br /> |

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (int gravity)
```

<br />

<br />

|       Parameters        ||
|-----------|--------------|
| `gravity` | `int` <br /> |

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (ActionBar.LayoutParams source)
```

<br />

<br />

|                Parameters                 ||
|----------|---------------------------------|
| `source` | `ActionBar.LayoutParams` <br /> |

### ActionBar.LayoutParams

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

```
ActionBar.LayoutParams (ViewGroup.LayoutParams source)
```

<br />

<br />

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

-

  ## Interfaces

  - [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)
  - [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)
  - [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener)
  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider)
  - [AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)
-

  ## Classes

  - [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)
  - [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)
  - [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)
  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle)
  - [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)
  - [AlertDialog.Builder](https://developer.android.com/reference/android/support/v7/app/AlertDialog.Builder)
  - [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)
  - [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)
  - [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)
  - [AppCompatDialogFragment](https://developer.android.com/reference/android/support/v7/app/AppCompatDialogFragment)
  - [AppCompatViewInflater](https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater)
  - [MediaRouteActionProvider](https://developer.android.com/reference/android/support/v7/app/MediaRouteActionProvider)
  - [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton)
  - [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)
  - [MediaRouteChooserDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialogFragment)
  - [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog)
  - [MediaRouteControllerDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialogFragment)
  - [MediaRouteDialogFactory](https://developer.android.com/reference/android/support/v7/app/MediaRouteDialogFactory)
  - [MediaRouteDiscoveryFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteDiscoveryFragment)