TtListItemBinder

interface TtListItemBinder<B : ViewDataBinding, VM>

An interface for binding ViewModels to list item views.

Used in combination with TtListLinearLayout and TtListTableLayout. By default, TtListItemViewModelBinder is used to bind the ViewModel to a data binding variable called viewModel. For custom behavior, a different implementation of this interface may be passed to the TtListLinearLayout and the TtListTableLayout.

Parameters

B

The type of data binding class used to inflate the view and bind it to the ViewModel VM.

VM

The type of ViewModel used to populate an item in the list.

Functions

Link copied to clipboard
abstract fun bind(binding: B, viewModel: VM)

Implementations must bind viewModel to the given binding.

Inheritors

Link copied to clipboard