Interface

ActionCallback

A callback executed in response to the user action, before the content is updated.

Source set: Android

Deprecated

glance-wear-tiles is deprecated and will be removed

Added in 1.0.0-alpha07

Deprecated in 1.0.0-alpha07

public interface ActionCallback

A callback executed in response to the user action, before the content is updated. The implementing class must have a public zero argument constructor, this is used to instantiate the class at runtime.

Functions

onAction

Added in 1.0.0-alpha07

Deprecated in 1.0.0-alpha07

public suspend fun onAction(context: Context, glanceId: GlanceId)

Performs the work associated with this action. Called when the action is triggered.

Parameters

context the calling context
glanceId the GlanceId that triggered this action