Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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.