# BoxInsetLayout.LayoutParams

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

*** ** * ** ***


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

*** ** * ** ***

Per-child layout information for layouts that support margins, gravity and boxedEdges. See BoxInsetLayout Layout Attributes for a list of all child view attributes that this class supports. layout_boxedEdges

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_ALL() = 15` The view will force an inset on all of the edges of the children. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_BOTTOM() = 8` The view will force an inset on the bottom edge of the children. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_LEFT() = 1` The view will force an inset on the left edge of the children. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_NONE() = 0` Default boxing setting. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_RIGHT() = 4` The view will force an inset on the right edge of the children. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_TOP() = 2` The view will force an inset on the top edge of the children. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(androidx.wear.widget.BoxInsetLayout.LayoutParams)(source: https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams)` Copy constructor. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.widget.FrameLayout.LayoutParams)(source: https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html)` Copy constructor. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` Copy constructor. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams)(source: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` Copy constructor. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet)(context: https://developer.android.com/reference/android/content/Context.html, attrs: https://developer.android.com/reference/android/util/AttributeSet.html?)` Creates a new set of layout parameters. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.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)` Creates a new set of layout parameters with the specified width and height. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.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)` Creates a new set of layout parameters with the specified width, height and gravity. |
| `https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(int,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, boxed: 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/wear/widget/BoxInsetLayout.LayoutParams#boxedEdges()` Specifies the screen-specific insets for each of the child edges. |

| ### Inherited Constants |
|---|
| From [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html#UNSPECIFIED_GRAVITY = -1` | |
| 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.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html#gravity` | |
| 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` | |

## Constants

### BOX_ALL

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

```
const val BOX_ALL = 15: Int
```

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

### BOX_BOTTOM

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

```
const val BOX_BOTTOM = 8: Int
```

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

### BOX_LEFT

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

```
const val BOX_LEFT = 1: Int
```

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

### BOX_NONE

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

```
const val BOX_NONE = 0: Int
```

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

### BOX_RIGHT

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

```
const val BOX_RIGHT = 4: Int
```

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

### BOX_TOP

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

```
const val BOX_TOP = 2: Int
```

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

## Public constructors

### LayoutParams

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

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

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

| Parameters |
|---|---|
| `source: https://developer.android.com/reference/kotlin/androidx/wear/widget/BoxInsetLayout.LayoutParams` | The layout params to copy from. |

### LayoutParams

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

```
LayoutParams(source: FrameLayout.LayoutParams)
```

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

| Parameters |
|---|---|
| `source: https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html` | The layout params to copy from. |

### LayoutParams

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

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

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

| Parameters |
|---|---|
| `source: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` | The layout params to copy from. |

### LayoutParams

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

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

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

| Parameters |
|---|---|
| `source: https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` | The layout params to copy from. |

### LayoutParams

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

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

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

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | the application environment |
| `attrs: https://developer.android.com/reference/android/util/AttributeSet.html?` | the set of attributes from which to extract the layout parameters' values |

### LayoutParams

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

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

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

| 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 pixelsy |

### LayoutParams

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

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

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

| 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 |
| `gravity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the gravity |

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

### LayoutParams

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

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

## Public properties

### boxedEdges

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

```
val boxedEdges: Int
```

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