View Model

GPTKB entity

Statements (57)
Predicate Object
gptkbp:instance_of gptkb:architect
gptkbp:bfsLayer 2
gptkbp:bfsParent gptkb:architect
gptkbp:can_be_used_with gptkb:Model
gptkb:Live_Data
Coroutines
Room database
gptkbp:can_provide UI-related data
gptkbp:constructed_in View Model Provider.get()
gptkbp:created_by gptkb:View_Model_Provider._New_Instance_Factory
gptkb:Company
View Model Provider. Android View Model Factory
gptkbp:focuses_on gptkb:Lifecycle_Owner
gptkb:View_Model_Store
Activity or Fragment lifecycle
gptkbp:held_in multiple Live Data objects
https://www.w3.org/2000/01/rdf-schema#label View Model
gptkbp:is a service
a presenter
lifecycle-aware
not destroyed on configuration changes
a View
a controller
a data model
a data repository
a model class
a singleton
responsible for UI logic
responsible for UI rendering
gptkbp:is_compatible_with gptkb:Jetpack_Compose
Fragment and Activity
gptkbp:is_designed_for UI-related data persistence
gptkbp:is_divided_into UI data from business logic
gptkbp:is_equipped_with with Dependency Injection frameworks
gptkbp:is_often_associated_with between multiple fragments
gptkbp:is_part_of gptkb:Android_Jetpack
Android's architecture components
MVVM architecture
Android's MVVM pattern
gptkbp:is_tested_for gptkb:theorem
gptkbp:is_used_for data preparation for UI
gptkbp:is_used_to handle configuration changes
manage UI-related data
handle user interactions
hold UI state
observe Live Data changes
gptkbp:lifespan gptkb:theorem
gptkbp:maintains data during configuration changes
gptkbp:maintenance gptkb:theorem
associated Lifecycle Owner is destroyed
gptkbp:provides data to UI controllers
gptkbp:replaced_by gptkb:View_Model_Store
gptkbp:suitable_for complex UI data management
data that needs to survive configuration changes
gptkbp:supports data sharing between fragments
gptkbp:type_of Android View Model
gptkbp:used_in Android applications