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
suspend inline R |
<R : Any?> ContextAware.withContextAvailable( Run |
Extension functions
withContextAvailable
suspend inline fun <R : Any?> 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.