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

AndroidViewModel

open class AndroidViewModel : ViewModel
kotlin.Any
   ↳ androidx.lifecycle.ViewModel
   ↳ androidx.lifecycle.AndroidViewModel

Application context aware ViewModel.

Subclasses must have a constructor which accepts Application as the only parameter.

Summary

Public constructors
<init>(@NonNull application: Application)

Public methods
open T

Return the application.

Inherited functions

Public constructors

<init>

AndroidViewModel(@NonNull application: Application)

Public methods

getApplication

@NonNull open fun <T : Application!> getApplication(): T

Return the application.