ComplicationSlotBounds

public final class ComplicationSlotBounds


ComplicationSlotBounds are defined by fractional screen space coordinates in unit-square 0..1. These bounds will be subsequently clamped to the unit square and converted to screen space coordinates. NB 0 and 1 are included in the unit square.

One bound is expected per ComplicationType to allow androidx.wear.watchface.ComplicationSlots to change shape depending on the type.

Summary

Public fields

final @NonNull Map<@NonNull ComplicationType, @NonNull RectF>

Per ComplicationType fractional unit-square screen space complication bounds.

Public constructors

Constructs a ComplicationSlotBounds where all complication types have the same screen space unit-square bounds.

ComplicationSlotBounds(
    @NonNull Map<@NonNull ComplicationType, @NonNull RectF> perComplicationTypeBounds
)

Public fields

perComplicationTypeBounds

@NonNull
public final @NonNull Map<@NonNull ComplicationType, @NonNull RectFperComplicationTypeBounds

Per ComplicationType fractional unit-square screen space complication bounds.

Public constructors

ComplicationSlotBounds

public final ComplicationSlotBounds(@NonNull RectF bounds)

Constructs a ComplicationSlotBounds where all complication types have the same screen space unit-square bounds.

ComplicationSlotBounds

public final ComplicationSlotBounds(
    @NonNull Map<@NonNull ComplicationType, @NonNull RectF> perComplicationTypeBounds
)