<div class='sourceset sourceset-android'>Android</div>

```kotlin
@JvmDefaultWithCompatibility
public interface Horizontal
```

Used to specify the horizontal arrangement of the layout's children in layouts like
[SpatialRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialRow).

## Functions

<h2 id="arrange-totalsize-sizes-layoutdirection-outpositions">arrange</h2>

```kotlin
public fun Density.arrange(
            totalSize: Int,
            sizes: IntArray,
            layoutDirection: LayoutDirection,
            outPositions: IntArray,
        )
```

Horizontally places the layout children.

#### Parameters

| | |
| --- | --- |
| totalSize | Available space that can be occupied by the children, in pixels. |
| sizes | An array of sizes of all children, in pixels. |
| layoutDirection | A layout direction, left-to-right or right-to-left, of the parent layout that should be taken into account when determining positions of the children. |
| outPositions | An array of the size of `sizes` that returns the calculated positions. Position of each child is from the left edge of the parent to center of the child, in pixels. |