DividerAttributes.DragRange.SplitRatioDragRange


public final class DividerAttributes.DragRange.SplitRatioDragRange extends DividerAttributes.DragRange


A drag range represented as an interval of the primary container's split ratios.

Throws
kotlin.IllegalArgumentException

if the provided values are invalid.

Summary

Public constructors

SplitRatioDragRange(
    @FloatRange(from = 0.0, to = 1.0, fromInclusive = false, toInclusive = false) float minRatio,
    @FloatRange(from = 0.0, to = 1.0, fromInclusive = false, toInclusive = false) float maxRatio
)

constructs a new SplitRatioDragRange

Public methods

boolean
equals(Object other)
final float

the maximum split ratio of the primary container that the user is allowed to drag to.

final float

the minimum split ratio of the primary container that the user is allowed to drag to.

int
@NonNull String

Public constructors

SplitRatioDragRange

Added in 1.4.0-alpha01
public SplitRatioDragRange(
    @FloatRange(from = 0.0, to = 1.0, fromInclusive = false, toInclusive = false) float minRatio,
    @FloatRange(from = 0.0, to = 1.0, fromInclusive = false, toInclusive = false) float maxRatio
)

constructs a new SplitRatioDragRange

Public methods

equals

public boolean equals(Object other)

getMaxRatio

Added in 1.4.0-alpha01
public final float getMaxRatio()

the maximum split ratio of the primary container that the user is allowed to drag to. When the divider is dragged beyond this ratio, the system will choose to either fully expand the primary container, or move the divider back to this ratio.

getMinRatio

Added in 1.4.0-alpha01
public final float getMinRatio()

the minimum split ratio of the primary container that the user is allowed to drag to. When the divider is dragged beyond this ratio, the system will choose to either fully expand the secondary container, or move the divider back to this ratio.

hashCode

public int hashCode()

toString

public @NonNull String toString()