# LayoutElementBuilders.Row

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

*** ** * ** ***


```
public final class LayoutElementBuilders.Row implements LayoutElementBuilders.LayoutElement
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

A row of elements. Each child will be laid out horizontally, one after another (i.e. stacking to the right). This element will size itself to the smallest size required to hold all of its children (e.g. if it contains three elements sized 10x10, 20x20 and 30x30, the resulting row will be 60x30).

If specified, vertical_alignment can be used to control the gravity inside the container, affecting the vertical placement of children whose width are smaller than the resulting row height.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row.Builder implements https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.LayoutElement.Builder` **This class is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.LayoutElement>` | `[getContents](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getContents())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.ContainerDimension` | `[getHeight](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getHeight())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/ModifiersBuilders.Modifiers` | `[getModifiers](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getModifiers())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.VerticalAlignmentProp` | `[getVerticalAlignment](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getVerticalAlignment())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.ContainerDimension` | `[getWidth](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getWidth())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### getContents

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

```
public @NonNull List<LayoutElementBuilders.LayoutElement> [getContents](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getContents())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the list of child elements to place inside this `https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row`. Intended for testing purposes only.

### getHeight

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

```
public @Nullable DimensionBuilders.ContainerDimension [getHeight](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getHeight())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the height of this row. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension). Intended for testing purposes only.

### getModifiers

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

```
public @Nullable ModifiersBuilders.Modifiers [getModifiers](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getModifiers())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets `https://developer.android.com/reference/androidx/wear/tiles/ModifiersBuilders.Modifiers` for this element. Intended for testing purposes only.

### getVerticalAlignment

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

```
public @Nullable LayoutElementBuilders.VerticalAlignmentProp [getVerticalAlignment](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getVerticalAlignment())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the vertical alignment of elements inside this row, if they are narrower than the resulting height of the row. If not defined, defaults to VERTICAL_ALIGN_CENTER. Intended for testing purposes only.

### getWidth

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

```
public @Nullable DimensionBuilders.ContainerDimension [getWidth](https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.Row#getWidth())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the width of this row. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension). Intended for testing purposes only.