androidx.glance.wear.tiles.state
Top-level functions summary
suspend T |
<T : Any?> This function is deprecated. glance-wear-tiles is deprecated and will be removed |
suspend T |
<T : Any?> This function is deprecated. glance-wear-tiles is deprecated and will be removed |
Top-level functions
getWearTileState
suspend fun <T : Any?>getWearTileState(
context: Context,
definition: GlanceStateDefinition<T>,
glanceId: GlanceId
): T
Retrieve the state of a wear tile.
The state definition must be the one used for that particular wear tile.
| Parameters | |
|---|---|
context: Context |
the context used to create this state |
definition: GlanceStateDefinition<T> |
the configuration that defines this state |
glanceId: GlanceId |
the glance id of this particular tile service |
updateWearTileState
suspend fun <T : Any?>updateWearTileState(
context: Context,
definition: GlanceStateDefinition<T>,
glanceId: GlanceId,
updateState: suspend (T) -> T
): T
Update the state of a wear tile.
The state definition must be the one used for this particular tile service.
| Parameters | |
|---|---|
context: Context |
the context used to create this state |
definition: GlanceStateDefinition<T> |
the configuration that defines this state |
glanceId: GlanceId |
the glance id of this particular tile service |
updateState: suspend (T) -> T |
the block defines how the state to be updated |