androidx.activity.contextaware
Interfaces
ContextAware |
A |
OnContextAvailableListener |
Listener for receiving a callback at the first moment a |
Classes
ContextAwareHelper |
Helper class for implementing |
Extension functions summary
For ContextAware | |
suspend R |
ContextAware.withContextAvailable(crossinline onContextAvailable: (Context) -> R) Run onContextAvailable when the Context becomes available and resume with the result. |
Extension functions
withContextAvailable
inline suspend fun <R> ContextAware.withContextAvailable(crossinline onContextAvailable: (Context) -> R): R
Run onContextAvailable when the Context becomes available and resume with the result.
If the Context is already available, onContextAvailable will be synchronously called on the current coroutine context. Otherwise, onContextAvailable will be called on the UI thread immediately when the Context becomes available.