BackgroundComplicationTapFilter


class BackgroundComplicationTapFilter : ComplicationTapFilter


Default ComplicationTapFilter for ComplicationSlotBoundsType.BACKGROUND complicationSlots.

use Watch Face Format instead

Summary

Public constructors

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public functions

open Boolean
hitTest(
    complicationSlot: ComplicationSlot,
    screenBounds: Rect,
    x: @Px Int,
    y: @Px Int,
    includeMargins: Boolean
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited functions

From androidx.wear.watchface.ComplicationTapFilter
open Boolean
hitTest(
    complicationSlot: ComplicationSlot,
    screenBounds: Rect,
    x: @Px Int,
    y: @Px Int
)

This function is deprecated. hitTest without specifying includeMargins is deprecated

Public constructors

BackgroundComplicationTapFilter

Added in 1.0.0
Deprecated in 1.3.0-alpha06
BackgroundComplicationTapFilter()

Public functions

hitTest

open fun hitTest(
    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 ComplicationSlot to perform a hit test for.

screenBounds: Rect

A Rect describing the bounds of the display.

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