Interface

RemoteAlignment

A remote equivalent of androidx.compose.ui.Alignment.

Source set: Android
public interface RemoteAlignment

A remote equivalent of androidx.compose.ui.Alignment. It is used to define how a layout's children should be positioned.

Pre-defined alignment objects are available through the companion object:

  • Horizontal: Start, CenterHorizontally, End
  • Vertical: Top, CenterVertically, Bottom

Properties

horizontal

Source set: Android
public val horizontal: Horizontal

vertical

Source set: Android
public val vertical: Vertical

Members

Horizontal

Source set: Android
public sealed interface Horizontal

A remote equivalent of androidx.compose.ui.Alignment.Horizontal. It is used to define how a layout's children should be positioned horizontally.

Pre-defined alignment objects are available: Start, CenterHorizontally, and End.

Vertical

Source set: Android
public sealed interface Vertical

An alignment that defines how to place a child vertically inside a parent layout. This corresponds to androidx.compose.ui.Alignment.Vertical.

Companion

Source set: Android
public companion object

A collection of common RemoteAlignments aware of layout direction.

Properties

TopStart

Source set: Android
public val TopStart: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.START, ColumnLayout.TOP)

Aligns the child at the top-start corner of the parent.

TopCenter

Source set: Android
public val TopCenter: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.CENTER, ColumnLayout.TOP)

Aligns the child at the top-center edge of the parent.

TopEnd

Source set: Android
public val TopEnd: RemoteAlignment = RemoteBiasAlignment(ColumnLayout.END, ColumnLayout.TOP)

Aligns the child at the top-end corner of the parent.

CenterStart

Source set: Android
public val CenterStart: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.START, ColumnLayout.CENTER)

Aligns the child at the center-start edge of the parent.

Center

Source set: Android
public val Center: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.CENTER, ColumnLayout.CENTER)

Aligns the child at the center of the parent both horizontally and vertically.

CenterEnd

Source set: Android
public val CenterEnd: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.END, ColumnLayout.CENTER)

Aligns the child at the center-end edge of the parent.

BottomStart

Source set: Android
public val BottomStart: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.START, ColumnLayout.BOTTOM)

Aligns the child at the bottom-start corner of the parent.

BottomCenter

Source set: Android
public val BottomCenter: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.CENTER, ColumnLayout.BOTTOM)

Aligns the child at the bottom-center edge of the parent.

BottomEnd

Source set: Android
public val BottomEnd: RemoteAlignment =
            RemoteBiasAlignment(ColumnLayout.END, ColumnLayout.BOTTOM)

Aligns the child at the bottom-end corner of the parent.

Top

Source set: Android
public val Top: Vertical = RemoteBiasAlignment.Vertical(ColumnLayout.TOP)

Aligns the child at the top edge of the parent.

CenterVertically

Source set: Android
public val CenterVertically: Vertical = RemoteBiasAlignment.Vertical(ColumnLayout.CENTER)

Aligns the child vertically in the center of the parent.

Bottom

Source set: Android
public val Bottom: Vertical = RemoteBiasAlignment.Vertical(ColumnLayout.BOTTOM)

Aligns the child at the bottom edge of the parent.

Start

Source set: Android
public val Start: Horizontal = RemoteBiasAlignment.Horizontal(ColumnLayout.START)

Aligns the child at the start edge of the parent.

CenterHorizontally

Source set: Android
public val CenterHorizontally: Horizontal =
            RemoteBiasAlignment.Horizontal(ColumnLayout.CENTER)

Aligns the child horizontally in the center of the parent.

End

Source set: Android
public val End: Horizontal = RemoteBiasAlignment.Horizontal(ColumnLayout.END)

Aligns the child at the end edge of the parent.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: