Component - ViewModel creation
This UI component shows how a ViewModel is created and used in an Android app with Kotlin. The ViewModel holds data that survives screen rotations and helps keep UI code clean and simple.
This UI component shows how a ViewModel is created and used in an Android app with Kotlin. The ViewModel holds data that survives screen rotations and helps keep UI code clean and simple.
Activity
└── ViewModelProvider
└── ViewModel
└── LiveData
└── Observer
└── UI Components (TextView, Button)