ActionCallback

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.

Summary

Public functions

suspend Unit
onAction(context: Context, glanceId: GlanceId)

Performs the work associated with this action.

Public functions

onAction

Added in 1.0.0-alpha06
suspend fun onAction(context: Context, glanceId: GlanceId): Unit

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

Parameters
context: Context

the calling context

glanceId: GlanceId

the GlanceId that triggered this action