ComplicationTapFilter
public 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 methods |
|
|---|---|
default boolean |
This method is deprecated. hitTest without specifying includeMargins is deprecated |
default boolean |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public methods
default booleanhitTest(
@NonNull ComplicationSlot complicationSlot,
@NonNull 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 | |
|---|---|
@NonNull ComplicationSlot complicationSlot |
The |
@NonNull Rect screenBounds |
A |
@Px int x |
The screen space X coordinate in pixels. |
@Px int y |
The screen space Y coordinate in pixels. |
hitTest
default booleanhitTest(
@NonNull ComplicationSlot complicationSlot,
@NonNull Rect screenBounds,
@Px int x,
@Px int y,
boolean includeMargins
)
Performs a hit test, returning true if the supplied coordinates in pixels are within the the provided complicationSlot scaled to screenBounds.
| Parameters | |
|---|---|
@NonNull ComplicationSlot complicationSlot |
The |
@NonNull Rect screenBounds |
A |
@Px int x |
The screen space X coordinate in pixels. |
@Px int y |
The screen space Y coordinate in pixels. |
boolean includeMargins |
Whether or not the margins should be included |