ComplicationTapFilter
interface ComplicationTapFilter
BackgroundComplicationTapFilter |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
RoundRectComplicationTapFilter |
This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Interface for determining whether a tap hits a complication.
use Watch Face Format instead
Summary
Public functions |
|
|---|---|
open Boolean |
This function is deprecated. hitTest without specifying includeMargins is deprecated |
open Boolean |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public functions
open funhitTest(
complicationSlot: ComplicationSlot,
screenBounds: Rect,
x: @Px Int,
y: @Px Int
): Boolean
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 |
screenBounds: Rect |
A |
x: @Px Int |
The screen space X coordinate in pixels. |
y: @Px Int |
The screen space Y coordinate in pixels. |
hitTest
open funhitTest(
complicationSlot: ComplicationSlot,
screenBounds: Rect,
x: @Px Int,
y: @Px Int,
includeMargins: Boolean
): Boolean
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 |
screenBounds: Rect |
A |
x: @Px Int |
The screen space X coordinate in pixels. |
y: @Px Int |
The screen space Y coordinate in pixels. |
includeMargins: Boolean |
Whether or not the margins should be included |