class Image : Visual
Reactively updates the image of an ImageView whenever the state of its owner changes. An Image can be configured with the following options:
true
).0
).1000
).null
, meaning it will fallback to size
).null
, meaning it will fallback to size
).fun initialsBuilder(initials: String, engraving: String, view: ImageView): Map<String, Any> {
return hashMapOf(
"initials" to initials,
"profile" to arrayOf(engraving)
)
}
Image(imageView: ImageView, owner: Ripe, options: Map<String, Any> = HashMap())
Constructs a new Image with the imageView, a Ripe instance as owner and a options map. |
val options: Map<String, Any>
A map with options to configure the image. |
|
val owner: Ripe
The Ripe instance to be shown. |
fun deinit(): Unit
The Image deinitializer, to be called (by the owner) when it should stop responding to updates so that any necessary cleanup operations can be executed. |
|
fun update(state: Map<String, Any>): Unit
This function is called (by the owner) whenever its state changes so that the Image can update itself for the new state. |