# LayoutElementBuilders.Column.Builder

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/LayoutElementBuilders.java+class:androidx.wear.protolayout.LayoutElementBuilders.Column.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public final class LayoutElementBuilders.Column.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#Builder()()` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#addContent(androidx.wear.protolayout.LayoutElementBuilders.LayoutElement)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.LayoutElement content)` Adds one item to the list of child elements to place inside this `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column` | `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#build()()` Builds an instance from accumulated values. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#setHeight(androidx.wear.protolayout.DimensionBuilders.ContainerDimension)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ContainerDimension height)` Sets the height of this column. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#setHorizontalAlignment(int)(int horizontalAlignment)` Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#setHorizontalAlignment(androidx.wear.protolayout.LayoutElementBuilders.HorizontalAlignmentProp)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.HorizontalAlignmentProp horizontalAlignment )` Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#setModifiers(androidx.wear.protolayout.ModifiersBuilders.Modifiers)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers modifiers)` Sets `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for this element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder#setWidth(androidx.wear.protolayout.DimensionBuilders.ContainerDimension)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ContainerDimension width)` Sets the width of this column. |

## Public constructors

### Builder

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

```
public Builder()
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column.Builder`.

## Public methods

### addContent

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder addContent(@NonNull LayoutElementBuilders.LayoutElement content)
```

Adds one item to the list of child elements to place inside this `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Column`.

### build

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

```
public @NonNull LayoutElementBuilders.Column build()
```

Builds an instance from accumulated values.

### setHeight

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHeight(@NonNull DimensionBuilders.ContainerDimension height)
```

Sets the height of this column. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

### setHorizontalAlignment

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHorizontalAlignment(int horizontalAlignment)
```

Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

### setHorizontalAlignment

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setHorizontalAlignment(
    @NonNull LayoutElementBuilders.HorizontalAlignmentProp horizontalAlignment
)
```

Sets the horizontal alignment of elements inside this column, if they are narrower than the resulting width of the column. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

### setModifiers

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setModifiers(@NonNull ModifiersBuilders.Modifiers modifiers)
```

Sets `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for this element.

### setWidth

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull LayoutElementBuilders.Column.Builder setWidth(@NonNull DimensionBuilders.ContainerDimension width)
```

Sets the width of this column. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).