open class LendObjectViewModel
Part of viewmodels.
The viewmodel that is used to display individual items of type LendingObject, it's a simple abstraction that holds the LendingObject and the icon background color ColorDrawable, the latter is determined by the viewAdapter. Also responsible for determining the object's icon
<init> |
Part of viewmodels. LendObjectViewModel(: LendingObject, : Context) |
context |
val context: Context |
description |
val description: String |
name |
val name: String |
numberOfUsers |
val numberOfUsers: String |
color |
Method that returns a background color for the lendobject's type icon, depending on it's state: fun color(): ColorDrawable |
getLendObject |
fun getLendObject(): LendingObject |
type |
Returns the icon that correspond to the LendObjectType of data fun type(): Int |