blob: b10b48c669c35989da8dfbe5b3baf42314478b77 [file] [log] [blame]
<html devsite="true">
<head>
<title>Arrangement</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>Arrangement</h1>
<p>
<pre>public static class <a href="/reference/androidx/compose/foundation/layout/Arrangement.html">Arrangement</a></pre>
</p>
<hr>
<p>Used to specify the arrangement of the layout's children in layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)">Row</a></code> or <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)">Column</a></code> in the main axis direction (horizontal and vertical, respectively).</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Nested types</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td>
<div><code>public static class <a href="/reference/androidx/compose/foundation/layout/Arrangement.Absolute.html">Arrangement.Absolute</a></code></div>
</td>
</tr>
<tr>
<td>
<div><code>public interface <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a></code></div>
<p>Used to specify the horizontal arrangement of the layout's children in layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)">Row</a></code>.</p>
</td>
</tr>
<tr>
<td>
<div><code>public interface <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a> extends <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a>, <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></div>
<p>Used to specify the horizontal arrangement of the layout's children in horizontal layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)">Row</a></code>, or the vertical arrangement of the layout's children in vertical layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)">Column</a></code>.</p>
</td>
</tr>
<tr>
<td>
<div><code>public interface <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></div>
<p>Used to specify the vertical arrangement of the layout's children in layouts like <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)">Column</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public fields</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Bottom()">Bottom</a></code></div>
<p>Place children vertically such that they are as close as possible to the bottom of the main axis.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Center()">Center</a></code></div>
<p>Place children such that they are as close as possible to the middle of the main axis.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#End()">End</a></code></div>
<p>Place children horizontally such that they are as close as possible to the end of the main axis.</p>
</td>
</tr>
<tr>
<td><code>static @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.html">Arrangement</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#INSTANCE()">INSTANCE</a></code></div>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceAround()">SpaceAround</a></code></div>
<p>Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child, but half the amount of space existing otherwise between two consecutive children.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceBetween()">SpaceBetween</a></code></div>
<p>Place children such that they are spaced evenly across the main axis, without free space before the first child or after the last child.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceEvenly()">SpaceEvenly</a></code></div>
<p>Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Start()">Start</a></code></div>
<p>Place children horizontally such that they are as close as possible to the beginning of the horizontal axis (left if the layout direction is LTR, right otherwise).</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Top()">Top</a></code></div>
<p>Place children vertically such that they are as close as possible to the top of the main axis.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public methods</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Horizontal)">aligned</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment)</code></div>
<p>Place children horizontally one next to the other and align the obtained group according to an <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Horizontal)">alignment</a></code>.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Vertical)">aligned</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment)</code></div>
<p>Place children vertically one next to the other and align the obtained group according to an <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Vertical)">alignment</a></code>.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space)</code></div>
<p>Place children such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp)">space</a></code> distance across the main axis.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment)</code></div>
<p>Place children horizontally such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">space</a></code> distance.</p>
</td>
</tr>
<tr>
<td><code>static&nbsp;final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment)</code></div>
<p>Place children vertically such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">space</a></code> distance.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list">
<h2>Public fields</h2>
<div class="api-item"><a name="getBottom()"></a><a name="setBottom()"></a><a name="getBottom--"></a><a name="setBottom--"></a>
<h3 class="api-name" id="Bottom()">Bottom</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Bottom()">Bottom</a></pre>
<p>Place children vertically such that they are as close as possible to the bottom of the main axis. Visually: (top) ####123 (bottom)</p>
</div>
<div class="api-item"><a name="getCenter()"></a><a name="setCenter()"></a><a name="getCenter--"></a><a name="setCenter--"></a>
<h3 class="api-name" id="Center()">Center</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Center()">Center</a></pre>
<p>Place children such that they are as close as possible to the middle of the main axis. Visually: ##123## for LTR and ##321## for RTL.</p>
</div>
<div class="api-item"><a name="getEnd()"></a><a name="setEnd()"></a><a name="getEnd--"></a><a name="setEnd--"></a>
<h3 class="api-name" id="End()">End</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#End()">End</a></pre>
<p>Place children horizontally such that they are as close as possible to the end of the main axis. Visually: ####123 for LTR and 321#### for RTL.</p>
</div>
<div class="api-item"><a name="getINSTANCE()"></a><a name="setINSTANCE()"></a><a name="getINSTANCE--"></a><a name="setINSTANCE--"></a>
<h3 class="api-name" id="INSTANCE()">INSTANCE</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.html">Arrangement</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#INSTANCE()">INSTANCE</a></pre>
</div>
<div class="api-item"><a name="getSpaceAround()"></a><a name="setSpaceAround()"></a><a name="getSpaceAround--"></a><a name="setSpaceAround--"></a>
<h3 class="api-name" id="SpaceAround()">SpaceAround</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceAround()">SpaceAround</a></pre>
<p>Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child, but half the amount of space existing otherwise between two consecutive children. Visually: #1##2##3# for LTR and #3##2##1# for RTL</p>
</div>
<div class="api-item"><a name="getSpaceBetween()"></a><a name="setSpaceBetween()"></a><a name="getSpaceBetween--"></a><a name="setSpaceBetween--"></a>
<h3 class="api-name" id="SpaceBetween()">SpaceBetween</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceBetween()">SpaceBetween</a></pre>
<p>Place children such that they are spaced evenly across the main axis, without free space before the first child or after the last child. Visually: 1##2##3 for LTR or 3##2##1 for RTL.</p>
</div>
<div class="api-item"><a name="getSpaceEvenly()"></a><a name="setSpaceEvenly()"></a><a name="getSpaceEvenly--"></a><a name="setSpaceEvenly--"></a>
<h3 class="api-name" id="SpaceEvenly()">SpaceEvenly</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#SpaceEvenly()">SpaceEvenly</a></pre>
<p>Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child. Visually: #1#2#3# for LTR and #3#2#1# for RTL.</p>
</div>
<div class="api-item"><a name="getStart()"></a><a name="setStart()"></a><a name="getStart--"></a><a name="setStart--"></a>
<h3 class="api-name" id="Start()">Start</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Start()">Start</a></pre>
<p>Place children horizontally such that they are as close as possible to the beginning of the horizontal axis (left if the layout direction is LTR, right otherwise). Visually: 123#### for LTR and ####321.</p>
</div>
<div class="api-item"><a name="getTop()"></a><a name="setTop()"></a><a name="getTop--"></a><a name="setTop--"></a>
<h3 class="api-name" id="Top()">Top</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#Top()">Top</a></pre>
<p>Place children vertically such that they are as close as possible to the top of the main axis. Visually: (top) 123#### (bottom)</p>
</div>
</div>
<div class="list">
<h2>Public methods</h2>
<div class="api-item"><a name="aligned-androidx.compose.ui.Alignment.Horizontal-"></a><a name="aligned"></a>
<h3 class="api-name" id="aligned(androidx.compose.ui.Alignment.Horizontal)">aligned</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Horizontal)">aligned</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment)</pre>
<p>Place children horizontally one next to the other and align the obtained group according to an <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Horizontal)">alignment</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment</code></td>
<td>
<p>The alignment of the children inside the parent.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="api-item"><a name="aligned-androidx.compose.ui.Alignment.Vertical-"></a><a name="aligned"></a>
<h3 class="api-name" id="aligned(androidx.compose.ui.Alignment.Vertical)">aligned</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Vertical)">aligned</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment)</pre>
<p>Place children vertically one next to the other and align the obtained group according to an <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#aligned(androidx.compose.ui.Alignment.Vertical)">alignment</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment</code></td>
<td>
<p>The alignment of the children inside the parent.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="api-item"><a name="spacedBy-androidx.compose.ui.unit.Dp-"></a><a name="spacedby"></a>
<h3 class="api-name" id="spacedBy(androidx.compose.ui.unit.Dp)">spacedBy</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.HorizontalOrVertical.html">Arrangement.HorizontalOrVertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space)</pre>
<p>Place children such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp)">space</a></code> distance across the main axis. The spacing will be subtracted from the available space that the children can occupy. The <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp)">space</a></code> can be negative, in which case children will overlap.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space</code></td>
<td>
<p>The space between adjacent children.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="api-item"><a name="spacedBy(androidx.compose.ui.unit.Dp, androidx.compose.ui.Alignment.Horizontal)"></a><a name="spacedBy-androidx.compose.ui.unit.Dp-androidx.compose.ui.Alignment.Horizontal-"></a><a name="spacedby"></a>
<h3 class="api-name" id="spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">spacedBy</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Horizontal.html">Arrangement.Horizontal</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment)</pre>
<p>Place children horizontally such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">space</a></code> distance. The spacing will be subtracted from the available width that the children can occupy. An <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">alignment</a></code> can be specified to align the spaced children horizontally inside the parent, in case there is empty width remaining. The <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal)">space</a></code> can be negative, in which case children will overlap.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space</code></td>
<td>
<p>The space between adjacent children.</p>
</td>
</tr>
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Horizontal.html">Alignment.Horizontal</a>&nbsp;alignment</code></td>
<td>
<p>The alignment of the spaced children inside the parent.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="api-item"><a name="spacedBy(androidx.compose.ui.unit.Dp, androidx.compose.ui.Alignment.Vertical)"></a><a name="spacedBy-androidx.compose.ui.unit.Dp-androidx.compose.ui.Alignment.Vertical-"></a><a name="spacedby"></a>
<h3 class="api-name" id="spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">spacedBy</h3>
<pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/Arrangement.Vertical.html">Arrangement.Vertical</a>&nbsp;<a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">spacedBy</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment)</pre>
<p>Place children vertically such that each two adjacent ones are spaced by a fixed <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">space</a></code> distance. The spacing will be subtracted from the available height that the children can occupy. An <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">alignment</a></code> can be specified to align the spaced children vertically inside the parent, in case there is empty height remaining. The <code><a href="/reference/androidx/compose/foundation/layout/Arrangement.html#spacedBy(androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Vertical)">space</a></code> can be negative, in which case children will overlap.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/unit/Dp.html">Dp</a>&nbsp;space</code></td>
<td>
<p>The space between adjacent children.</p>
</td>
</tr>
<tr>
<td><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/ui/Alignment.Vertical.html">Alignment.Vertical</a>&nbsp;alignment</code></td>
<td>
<p>The alignment of the spaced children inside the parent.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>