Stay organized with collections
Save and categorize content based on your preferences.
Annotations
Interfaces
Classes
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-30 UTC."],[],[],null,["# androidx.lifecycle.viewmodel\n============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/androidx/lifecycle/viewmodel/package-summary \"View this page in Kotlin\") \\|Java\n\nAnnotations\n-----------\n\n|------------------------------------------------------------------------------------|---|\n| [ViewModelFactoryDsl](/reference/androidx/lifecycle/viewmodel/ViewModelFactoryDsl) | |\n\nInterfaces\n----------\n\n|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [CreationExtras.Key](/reference/androidx/lifecycle/viewmodel/CreationExtras.Key) | Key for the elements of [CreationExtras](/reference/androidx/lifecycle/viewmodel/CreationExtras). |\n\nClasses\n-------\n\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CreationExtras](/reference/androidx/lifecycle/viewmodel/CreationExtras) | A map-like object holding pairs of [CreationExtras.Key](/reference/androidx/lifecycle/viewmodel/CreationExtras.Key) and [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html), enabling efficient value retrieval for each key. |\n| [CreationExtrasKt](/reference/androidx/lifecycle/viewmodel/CreationExtrasKt) | |\n| [InitializerViewModelFactoryBuilder](/reference/androidx/lifecycle/viewmodel/InitializerViewModelFactoryBuilder) | DSL for constructing a new [ViewModelProvider.Factory](/reference/androidx/lifecycle/ViewModelProvider.Factory) |\n| [InitializerViewModelFactoryKt](/reference/androidx/lifecycle/viewmodel/InitializerViewModelFactoryKt) | |\n| [MutableCreationExtras](/reference/androidx/lifecycle/viewmodel/MutableCreationExtras) | A modifiable [CreationExtras](/reference/androidx/lifecycle/viewmodel/CreationExtras) that holds pairs of [CreationExtras.Key](/reference/androidx/lifecycle/viewmodel/CreationExtras.Key) and [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html), allowing efficient value retrieval for each key. |\n| [ViewModelInitializer](/reference/androidx/lifecycle/viewmodel/ViewModelInitializer) | Holds a [ViewModel](/reference/androidx/lifecycle/ViewModel) class and initializer for that class |\n| [CreationExtras.Empty](/reference/androidx/lifecycle/viewmodel/CreationExtras.Empty) | An empty read-only [CreationExtras](/reference/androidx/lifecycle/viewmodel/CreationExtras). |"]]