set State
Set the Hikage state value.
Usage:
val textState = mutableStateOf("Hello World!")
var text by textState
TextView {
setState(textState) {
text = it
}
}
// Modify the state.
text = "Hello Hikage!"This function binds the state observer to the View lifecycle.
The observer will be subscribed when the View is attached to window and automatically canceled when it is detached.
Return
Parameters
the state to be set.
the apply body.
Set the Hikage state value.
Return
Parameters
the state to be set.
the apply body.
See also
Set the Hikage state value.
This function creates a long lifecycle observer and will not be automatically canceled.
If you use it with short lifecycle objects, keep the returned StateSubscription and call StateSubscription.cancel manually.
Return
Parameters
the state to be set.
the apply body.
Set the Hikage state value.
This function creates a long lifecycle observer and will not be automatically canceled.
If you use it with short lifecycle objects, keep the returned StateSubscription and call StateSubscription.cancel manually.
Return
Parameters
the state to be set.
the apply body.