Class

OrbiterPosition

Represents the position of an Orbiter in relation to the parent, defined by its alignment, edge alignment, and offset.

Source set: Android
public sealed class OrbiterPosition private constructor(
    internal val alignment: SpatialAlignment,
    internal val horizontalEdgeAlignment: EdgeAlignment,
    internal val verticalEdgeAlignment: EdgeAlignment,
    internal val offset: DpVolumeOffset,
)

Represents the position of an Orbiter in relation to the parent, defined by its alignment, edge alignment, and offset. The edge alignment can be configured for both vertical bounds (i.e., the top or bottom edges of a panel) and horizontal bounds (i.e., the start or end sides of the panel) depending on the specified alignment.

TopStart horizontalEdgeAlignment = EdgeAlignment.Outside and verticalEdgeAlignment = EdgeAlignment.Outside, Left-to-Right (LTR):

+---------+
| Orbiter |
+---------+------------------------+
|                        |
|                        |
|      SpatialPanel      |
|                        |
|                        |
+------------------------+

TopStart horizontalEdgeAlignment = EdgeAlignment.Outside, verticalEdgeAlignment = EdgeAlignment.Inside, Left-to-Right (LTR):

+---------+------------------------+
| Orbiter |                        |
+---------+                        |
|      SpatialPanel      |
|                        |
|                        |
+------------------------+

TopStart horizontalEdgeAlignment = EdgeAlignment.Inside, verticalEdgeAlignment = EdgeAlignment.Outside, Left-to-Right (LTR):

+---------+
| Orbiter |
+---------+--------------+
|                        |
|      SpatialPanel      |
|                        |
|                        |
+------------------------+

TopStart horizontalEdgeAlignment = EdgeAlignment.Inside and verticalEdgeAlignment = EdgeAlignment.Inside, Left-to-Right (LTR):

+---------+--------------+
| Orbiter |              |
+---------+              |
|      SpatialPanel      |
|                        |
|                        |
+------------------------+

TopStart horizontalEdgeAlignment = EdgeAlignment.Center and verticalEdgeAlignment = EdgeAlignment.Center, Left-to-Right (LTR):

+---------+
| Orbiter |------------------+
+---------+                  |
|                        |
|      SpatialPanel      |
|                        |
|                        |
+------------------------+

BottomCenter verticalEdgeAlignment = EdgeAlignment.Center:

+------------------------+
|                        |
|                        |
|      SpatialPanel      |
|                        |
|      +---------+       |
+------| Orbiter |-------+
+---------+

Members

Center

Source set: Android
public class Center(
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation)
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.Center,
            horizontalEdgeAlignment = EdgeAlignment.Center,
            verticalEdgeAlignment = EdgeAlignment.Center,
            offset = offset,
        )

Center of the parent (non-edge).

Parameters

offset manual offset applied to the orbiter. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

TopStart

Source set: Android
public class TopStart(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.TopStart,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Top-Start edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the start edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the top edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

TopCenter

Source set: Android
public class TopCenter(
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.TopCenter,
            horizontalEdgeAlignment = EdgeAlignment.Center,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Top-Center edge alignment.

Parameters

verticalEdgeAlignment boundary offset behavior relative to the top edge of the parent's bounds
offset manual offset applied to the orbiter after the verticalEdgeAlignment's offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

TopEnd

Source set: Android
public class TopEnd(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.TopEnd,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Top-End edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the end edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the top edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

CenterStart

Source set: Android
public class CenterStart(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.CenterStart,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = EdgeAlignment.Center,
            offset = offset,
        )

Center-Start edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the start edge of the parent's bounds
offset manual offset applied to the orbiter after the horizontalEdgeAlignment's offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

CenterEnd

Source set: Android
public class CenterEnd(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.CenterEnd,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = EdgeAlignment.Center,
            offset = offset,
        )

Center-End edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the end edge of the parent's bounds
offset manual offset applied to the orbiter after the horizontalEdgeAlignment's offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

BottomStart

Source set: Android
public class BottomStart(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.BottomStart,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Bottom-Start edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the start edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the bottom edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

BottomCenter

Source set: Android
public class BottomCenter(
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.BottomCenter,
            horizontalEdgeAlignment = EdgeAlignment.Center,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Bottom-Center edge alignment.

Parameters

verticalEdgeAlignment boundary offset behavior relative to the bottom edge of the parent's bounds
offset manual offset applied to the orbiter after the verticalEdgeAlignment's offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

BottomEnd

Source set: Android
public class BottomEnd(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAlignment.BottomEnd,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Bottom-End edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the end edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the bottom edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied. This offset will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left.

TopLeft

Source set: Android
public class TopLeft(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.TopLeft,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Top-Left absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the left edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the top edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied without considering layout direction

TopRight

Source set: Android
public class TopRight(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.TopRight,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Top-Right absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the right edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the top edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied without considering layout direction

CenterLeft

Source set: Android
public class CenterLeft(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.CenterLeft,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = EdgeAlignment.Center,
            offset = offset,
        )

Center-Left absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the left edge of the parent's bounds
offset manual offset applied to the orbiter after the horizontalEdgeAlignment's offset is applied without considering layout direction

CenterRight

Source set: Android
public class CenterRight(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.CenterRight,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = EdgeAlignment.Center,
            offset = offset,
        )

Center-Right absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the right edge of the parent's bounds
offset manual offset applied to the orbiter after the horizontalEdgeAlignment's offset is applied without considering layout direction

BottomLeft

Source set: Android
public class BottomLeft(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.BottomLeft,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Bottom-Left absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the left edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the bottom edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied without considering layout direction

BottomRight

Source set: Android
public class BottomRight(
        horizontalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        verticalEdgeAlignment: EdgeAlignment = EdgeAlignment.Outside,
        offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    ) :
        OrbiterPosition(
            alignment = SpatialAbsoluteAlignment.BottomRight,
            horizontalEdgeAlignment = horizontalEdgeAlignment,
            verticalEdgeAlignment = verticalEdgeAlignment,
            offset = offset,
        )

Bottom-Right absolute edge alignment.

Parameters

horizontalEdgeAlignment boundary offset behavior relative to the right edge of the parent's bounds
verticalEdgeAlignment boundary offset behavior relative to the bottom edge of the parent's bounds
offset manual offset applied to the orbiter after the edge offset is applied without considering layout direction

EdgeAlignment

Source set: Android
public class EdgeAlignment private constructor(private val value: Int)

Specifies how the Orbiter is aligned relative to its parent's layout boundary.

Note: Calculates alignment based on the parent's rectangular layout bounds, not its visual shape or rounded corners. Use a custom offset in DpVolumeOffset to align with curved or non-rectangular contours.

Members

Companion

Source set: Android
public companion object

Properties

Outside

Source set: Android
public val Outside: EdgeAlignment = EdgeAlignment(0)

Positions the Orbiter fully outside the parent's layout boundary.

The orbiter does not overlap the parent panel's layout bounds. For example, a side rail will sit completely to the side of the parent.

+------------------------+
|                        |
+---------+                        |
| Orbiter |      SpatialPanel      |
+---------+                        |
|                        |
+------------------------+

Inside

Source set: Android
public val Inside: EdgeAlignment = EdgeAlignment(1)

Positions the Orbiter fully inside the parent's layout boundary.

The orbiter completely overlaps the parent panel's layout bounds, functioning as an overlay.

+------------------------+
|      SpatialPanel      |
+-----------+            |
|  Orbiter  |            |
+-----------+            |
|                        |
+------------------------+

Center

Source set: Android
public val Center: EdgeAlignment = EdgeAlignment(2)

Centers the Orbiter directly on the parent's layout boundary line.

The boundary line bisects the orbiter, placing it half-inside and half-outside the parent.

+------------------------+
|                        |
+-----|-----+                  |
|  Orbiter  | SpatialPanel     |
+-----|-----+                  |
|                        |
+------------------------+

Content updated: