# BoxInsetLayout.LayoutParams

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1  
Summary:[XML Attrs](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#lattrs)\|[Constants](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#constants)\|[Inherited Constants](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#inhconstants)\|[Fields](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#lfields)\|[Inherited Fields](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#inhfields)\|[Ctors](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#pubctors)\|[Inherited Methods](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#)  

# BoxInsetLayout.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
BoxInsetLayout.LayoutParams
`  
`


``


``


``

extends `[FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.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.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) ||
|   |   |   | ↳ | android.support.wear.widget.BoxInsetLayout.LayoutParams |

<br />

*** ** * ** ***

Per-child layout information for layouts that support margins, gravity and boxedEdges. See[BoxInsetLayout Layout Attributes](https://developer.android.com/reference/android/support/wear/R.styleable#BoxInsetLayout_Layout)for a list of all child view attributes that this class supports.

## Summary

|                                                                               ### XML attributes                                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [`BoxInsetLayout_Layout_boxedEdges`](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#attr_BoxInsetLayout_Layout_boxedEdges) |   |

|                                                                                          ### Constants                                                                                           ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [BOX_ALL](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_ALL) The view will force an inset on all of the edges of the children.      |
| `int` | [BOX_BOTTOM](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_BOTTOM) The view will force an inset on the bottom edge of the children. |
| `int` | [BOX_LEFT](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_LEFT) The view will force an inset on the left edge of the children.       |
| `int` | [BOX_NONE](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_NONE) Default boxing setting.                                              |
| `int` | [BOX_RIGHT](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_RIGHT) The view will force an inset on the right edge of the children.    |
| `int` | [BOX_TOP](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BOX_TOP) The view will force an inset on the top edge of the children.          |

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

|                                                                                                ### Fields                                                                                                 ||
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public int` | [boxedEdges](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#boxedEdges) Specifies the screen-specific insets for each of the child edges. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ### Inherited fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#)From class` android.widget.FrameLayout.LayoutParams ` |---------------|------------------| | ` public int` | `gravity` <br /> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.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/wear/widget/BoxInsetLayout.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                                                                                                                                                                                                                   ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(android.content.Context, android.util.AttributeSet))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs) ` Creates a new set of layout parameters. |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(int, int))`(int width, int height) ` Creates a new set of layout parameters with the specified width and height.                                                                                                                                                                           |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(int, int, int))`(int width, int height, int gravity) ` Creates a new set of layout parameters with the specified width, height and gravity.                                                                                                                                                |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(int, int, int, int))`(int width, int height, int gravity, int boxed) `                                                                                                                                                                                                                     |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(android.view.ViewGroup.LayoutParams))`(`[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` source) ` Copy constructor.                                                                                                            |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams))`(`[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` source) ` Copy constructor.                                                                                          |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(android.widget.FrameLayout.LayoutParams))`(`[FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html)` source) ` Copy constructor.                                                                                                  |
| ` `[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams#BoxInsetLayout.LayoutParams(android.support.wear.widget.BoxInsetLayout.LayoutParams))`(`[BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams)` source) ` Copy constructor.                                                                    |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.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/wear/widget/BoxInsetLayout.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/wear/widget/BoxInsetLayout.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() `                    | ||

## XML attributes

### BoxInsetLayout_Layout_boxedEdges

<br />

<br />

## Constants

### BOX_ALL

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

```
int BOX_ALL
```

The view will force an inset on all of the edges of the children.

<br />

Constant Value: 15 (0x0000000f)  

### BOX_BOTTOM

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

```
int BOX_BOTTOM
```

The view will force an inset on the bottom edge of the children.

<br />

Constant Value: 8 (0x00000008)  

### BOX_LEFT

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

```
int BOX_LEFT
```

The view will force an inset on the left edge of the children.

<br />

Constant Value: 1 (0x00000001)  

### BOX_NONE

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

```
int BOX_NONE
```

Default boxing setting. There are no insets forced on the child views.

<br />

Constant Value: 0 (0x00000000)  

### BOX_RIGHT

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

```
int BOX_RIGHT
```

The view will force an inset on the right edge of the children.

<br />

Constant Value: 4 (0x00000004)  

### BOX_TOP

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

```
int BOX_TOP
```

The view will force an inset on the top edge of the children.

<br />

Constant Value: 2 (0x00000002)

## Fields

### boxedEdges

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

```
int boxedEdges
```

Specifies the screen-specific insets for each of the child edges.

<br />

## Public constructors

### BoxInsetLayout.LayoutParams

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

```
BoxInsetLayout.LayoutParams (Context context, 
                AttributeSet attrs)
```

Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.

<br />

|                                                 Parameters                                                  ||
|-----------|--------------------------------------------------------------------------------------------------|
| `context` | `Context`: the application environment <br />                                                    |
| `attrs`   | `AttributeSet`: the set of attributes from which to extract the layout parameters' values <br /> |

### BoxInsetLayout.LayoutParams

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

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

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

<br />

|                                                                                                                                           Parameters                                                                                                                                            ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `width`  | `int`: the width, either[MATCH_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT),[WRAP_CONTENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT)or a fixed size in pixels <br />   |
| `height` | `int`: the height, either[MATCH_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT),[WRAP_CONTENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT)or a fixed size in pixelsy <br /> |

### BoxInsetLayout.LayoutParams

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

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

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

<br />

|                                                                                                                                           Parameters                                                                                                                                            ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `width`   | `int`: the width, either[MATCH_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT),[WRAP_CONTENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT)or a fixed size in pixels <br />  |
| `height`  | `int`: the height, either[MATCH_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT),[WRAP_CONTENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT)or a fixed size in pixels <br /> |
| `gravity` | `int`: the gravity <br />                                                                                                                                                                                                                                                            |

**See also:**

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

### BoxInsetLayout.LayoutParams

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

```
BoxInsetLayout.LayoutParams (int width, 
                int height, 
                int gravity, 
                int boxed)
```

<br />

<br />

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

### BoxInsetLayout.LayoutParams

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

```
BoxInsetLayout.LayoutParams (ViewGroup.LayoutParams source)
```

Copy constructor. Clones the width and height of the source.

<br />

|                                 Parameters                                 ||
|----------|------------------------------------------------------------------|
| `source` | `ViewGroup.LayoutParams`: The layout params to copy from. <br /> |

### BoxInsetLayout.LayoutParams

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

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

Copy constructor. Clones the width, height and margin values.

<br />

|                                    Parameters                                    ||
|----------|------------------------------------------------------------------------|
| `source` | `ViewGroup.MarginLayoutParams`: The layout params to copy from. <br /> |

### BoxInsetLayout.LayoutParams

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

```
BoxInsetLayout.LayoutParams (FrameLayout.LayoutParams source)
```

Copy constructor. Clones the width, height, margin values, and gravity of the source.

<br />

|                                  Parameters                                  ||
|----------|--------------------------------------------------------------------|
| `source` | `FrameLayout.LayoutParams`: The layout params to copy from. <br /> |

### BoxInsetLayout.LayoutParams

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

```
BoxInsetLayout.LayoutParams (BoxInsetLayout.LayoutParams source)
```

Copy constructor. Clones the width, height, margin values, boxedEdges and gravity of the source.

<br />

|                                   Parameters                                    ||
|----------|-----------------------------------------------------------------------|
| `source` | `BoxInsetLayout.LayoutParams`: The layout params to copy from. <br /> |

-

  ## Interfaces

  - [CircularProgressLayout.OnTimerFinishedListener](https://developer.android.com/reference/android/support/wear/widget/CircularProgressLayout.OnTimerFinishedListener)
-

  ## Classes

  - [BoxInsetLayout](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout)
  - [BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams)
  - [CircularProgressLayout](https://developer.android.com/reference/android/support/wear/widget/CircularProgressLayout)
  - [CurvingLayoutCallback](https://developer.android.com/reference/android/support/wear/widget/CurvingLayoutCallback)
  - [RoundedDrawable](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable)
  - [SwipeDismissFrameLayout](https://developer.android.com/reference/android/support/wear/widget/SwipeDismissFrameLayout)
  - [SwipeDismissFrameLayout.Callback](https://developer.android.com/reference/android/support/wear/widget/SwipeDismissFrameLayout.Callback)
  - [WearableLinearLayoutManager](https://developer.android.com/reference/android/support/wear/widget/WearableLinearLayoutManager)
  - [WearableLinearLayoutManager.LayoutCallback](https://developer.android.com/reference/android/support/wear/widget/WearableLinearLayoutManager.LayoutCallback)
  - [WearableRecyclerView](https://developer.android.com/reference/android/support/wear/widget/WearableRecyclerView)