class UsingViewModel : AndroidViewModel
LendingViewModel designed to store and manage UI-related data in a lifecycle conscious way. This allows data to survive configuration changes such as screen rotations. In addition, background work such as fetching network results can continue through configuration changes and deliver results after the new Fragment or Activity is available.
application - The application that this viewmodel is attached to, it's safe to hold a
reference to applications across rotation since Application is never recreated during activity
or fragment lifecycle events.
Factory |
Factory for constructing DevByteViewModel with parameter class Factory : Factory |
<init> |
LendingViewModel designed to store and manage UI-related data in a lifecycle conscious way. This allows data to survive configuration changes such as screen rotations. In addition, background work such as fetching network results can continue through configuration changes and deliver results after the new Fragment or Activity is available. UsingViewModel(: Application, : String, : String) |
id |
val id: String |
using |
val using: LiveData<List<LendingObject>> |
onCleared |
Cancel all coroutines when the ViewModel is cleared fun onCleared(): Unit |
selectObject |
fun selectObject(: LendingObject?): Unit |