EdgeOffset

class EdgeOffset


Represents the offset of an orbiter from the main panel.

Summary

Public companion functions

EdgeOffset
inner(offset: Dp)

Creates an EdgeOffset representing an offset from the inner edge of an orbiter.

EdgeOffset
outer(offset: Dp)

Creates an EdgeOffset representing an offset from the outer edge of an orbiter.

EdgeOffset
overlap(offset: Dp)

Creates an EdgeOffset representing an overlap of an orbiter into the main panel relative to the inner edge of the orbiter.

Public functions

EdgeOffset
copy(amount: Dp, type: OrbiterOffsetType)
open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Dp

the magnitude of the offset in Dp.

OrbiterOffsetType

the type of offset (OrbiterOffsetType.OuterEdge or OrbiterOffsetType.InnerEdge).

Public companion functions

inner

fun inner(offset: Dp): EdgeOffset

Creates an EdgeOffset representing an offset from the inner edge of an orbiter.

An offset that represents the offset of an orbiter from the main panel relative to the inner edge of the orbiter. In inner edge alignment, the inner edge of the orbiter will be offset distance away from the edge of the main panel.

Parameters
offset: Dp

the offset value in Dp.

Returns
EdgeOffset

an EdgeOffset with the specified offset and type OrbiterOffsetType.InnerEdge.

outer

fun outer(offset: Dp): EdgeOffset

Creates an EdgeOffset representing an offset from the outer edge of an orbiter.

An offset that represents the offset of an orbiter from the main panel relative to the outer edge of the orbiter. In outer edge alignment, the outer edge of the orbiter will be offset distance away from the edge of the main panel.

Parameters
offset: Dp

the offset value in Dp.

Returns
EdgeOffset

an EdgeOffset with the specified offset and type OrbiterOffsetType.OuterEdge.

overlap

fun overlap(offset: Dp): EdgeOffset

Creates an EdgeOffset representing an overlap of an orbiter into the main panel relative to the inner edge of the orbiter.

In overlap alignment, the inner edge of the orbiter will be offset distance inset into the edge of the main panel.

Parameters
offset: Dp

the amount of overlap, specified in Dp.

Returns
EdgeOffset

an EdgeOffset with the offset's pixel value and OrbiterOffsetType.InnerEdge.

Public functions

copy

fun copy(amount: Dp = this.amount, type: OrbiterOffsetType = this.type): EdgeOffset

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

amount

Added in 1.0.0-alpha02
val amountDp

the magnitude of the offset in Dp.