# 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)

*** ** * ** ***


```
public class BoxInsetLayout.LayoutParams extends FrameLayout.LayoutParams
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.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/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 |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_ALL() = 15` The view will force an inset on all of the edges of the children. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_BOTTOM() = 8` The view will force an inset on the bottom edge of the children. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_LEFT() = 1` The view will force an inset on the left edge of the children. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_NONE() = 0` Default boxing setting. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_RIGHT() = 4` The view will force an inset on the right edge of the children. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#BOX_TOP() = 2` The view will force an inset on the top edge of the children. |

| ### Public fields |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#boxedEdges()` Specifies the screen-specific insets for each of the child edges. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(androidx.wear.widget.BoxInsetLayout.LayoutParams)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams source)` Copy constructor. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.widget.FrameLayout.LayoutParams)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html source)` Copy constructor. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html source)` Copy constructor. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html source)` Copy constructor. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/util/AttributeSet.html attrs)` Creates a new set of layout parameters. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(int,int)(int width, int height)` Creates a new set of layout parameters with the specified width and height. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(int,int,int)(int width, int height, int gravity)` Creates a new set of layout parameters with the specified width, height and gravity. |
| `https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams#LayoutParams(int,int,int,int)(int width, int height, int gravity, int boxed)` |

| ### Inherited Constants |
|---|
| From [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `static final int` | `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) |---|---| | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#FILL_PARENT = -1` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT = -1` | | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT = -2` | |

| ### Inherited fields |
|---|
| From [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `int` | `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) |---|---| | `int` | `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` | | `int` | `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) |---|---| | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#bottomMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#leftMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#rightMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#topMargin` | |

| ### Inherited methods |
|---|
| From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |---|---| | `void` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#setBaseAttributes(android.content.res.TypedArray, int, int)(https://developer.android.com/reference/android/content/res/TypedArray.html a, int widthAttr, int heightAttr)` | |
| From [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) |---|---| | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getLayoutDirection()()` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd()()` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart()()` | | `boolean` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#isMarginRelative()()` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#resolveLayoutDirection(int)(int layoutDirection)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setLayoutDirection(int)(int layoutDirection)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginEnd(int)(int end)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginStart(int)(int start)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int)(int left, int top, int right, int bottom)` | |

## Constants

### BOX_ALL

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

```
public static final int BOX_ALL = 15
```

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)

```
public static final int BOX_BOTTOM = 8
```

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)

```
public static final int BOX_LEFT = 1
```

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)

```
public static final int BOX_NONE = 0
```

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)

```
public static final int BOX_RIGHT = 4
```

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)

```
public static final int BOX_TOP = 2
```

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

## Public fields

### boxedEdges

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

```
public int boxedEdges
```

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

## Public constructors

### LayoutParams

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

```
public LayoutParams(@NonNull BoxInsetLayout.LayoutParams source)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/widget/BoxInsetLayout.LayoutParams source` | The layout params to copy from. |

### LayoutParams

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

```
public LayoutParams(@NonNull FrameLayout.LayoutParams source)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html source` | The layout params to copy from. |

### LayoutParams

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

```
public LayoutParams(@NonNull ViewGroup.LayoutParams source)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html source` | The layout params to copy from. |

### LayoutParams

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

```
public LayoutParams(@NonNull ViewGroup.MarginLayoutParams source)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html source` | The layout params to copy from. |

### LayoutParams

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

```
public LayoutParams(@NonNull Context context, @Nullable AttributeSet attrs)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | the application environment |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/util/AttributeSet.html attrs` | 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)

```
public LayoutParams(int width, int height)
```

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

| Parameters |
|---|---|
| `int width` | 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 |
| `int height` | 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)

```
public LayoutParams(int width, int height, int gravity)
```

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

| Parameters |
|---|---|
| `int width` | 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 |
| `int height` | 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 |
| `int gravity` | 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)

```
public LayoutParams(int width, int height, int gravity, int boxed)
```