RoundRectComplicationTapFilter

public final class RoundRectComplicationTapFilter implements ComplicationTapFilter


Default ComplicationTapFilter for ComplicationSlotBoundsType.ROUND_RECT complicationSlots.

Summary

Public constructors

Public methods

boolean
hitTest(
    ComplicationSlot complicationSlot,
    Rect screenBounds,
    @Px int x,
    @Px int y
)

Performs a hit test, returning true if the supplied coordinates in pixels are within the the provided complicationSlot scaled to screenBounds.

Public constructors

RoundRectComplicationTapFilter

public final RoundRectComplicationTapFilter()

Public methods

hitTest

public boolean hitTest(
    ComplicationSlot complicationSlot,
    Rect screenBounds,
    @Px int x,
    @Px int y
)

Performs a hit test, returning true if the supplied coordinates in pixels are within the the provided complicationSlot scaled to screenBounds.

Parameters
ComplicationSlot complicationSlot

The ComplicationSlot to perform a hit test for.

Rect screenBounds

A Rect describing the bounds of the display.

@Px int x

The screen space X coordinate in pixels.

@Px int y

The screen space Y coordinate in pixels.