Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

androidx.activity.contextaware

Interfaces

ContextAware

A ContextAware class is associated with a Context sometime after the class is instantiated.

OnContextAvailableListener

Listener for receiving a callback at the first moment a Context is made available to the ContextAware class.

Classes

ContextAwareHelper

Helper class for implementing ContextAware.

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.