AndroidViewBlock

class AndroidViewBlock<Presentation : View, Data : Any>(factory: (Context) -> Presentation, update: suspend (Presentation, Data) -> Unit) : ViewBlock<Data>

A ViewBlock implementation for Android views.

Parameters

Presentation

The type of view this block will produce.

Data

The type of the data this block will accept to update the view.

Constructors

Link copied to clipboard
constructor(block: (Context) -> Presentation)
constructor(factory: (Context) -> Presentation, update: suspend (Presentation, Data) -> Unit)

Properties

Link copied to clipboard
val id: String

Unique identifier for this view block instance.

Link copied to clipboard
open override val type: ViewBlock.Type

The type of the view block, indicating how it should be rendered.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open operator override fun invoke(data: Data)

Function responsible for rendering the view block with the given argument.