TtListLinearLayout
A generic LinearLayout that can present UI elements which are dynamically added via ViewModels. Custom logic for manipulating the content of the layout can be added by inheriting TtListItemBinder and assigning it to ttContentViewBinder.
By default, TtListItemViewModelBinder is assigned to ttContentViewBinder. It provides the default binding behavior for binders have exactly one data binding variable called viewModel. For custom behavior, a different TtListItemBinder should be implemented.
Dividers, thin lines between list items, can also be enabled by setting ttDivider to true. It is recommended to use ttDivider instead of assigning a drawable to android:divider. ttDivider enables more flexibilities like ttDividerInsetStart and ttDividerInsetEnd.
Note:: Do not mix using ttDivider and android:divider.
Parameters
The type of ViewModel used to populate the items in the LinearLayout.
The display context.
The attribute set provided in the layout XML file.
Properties
The identifier of the layout for a single item in the list.
The ViewModels used to populate each element in the view.
The binder used to bind view items with corresponding ViewModels.
The color of the divider. A divider is a thin line drawn between list items while ttDivider is true.
The end inset of the divider. A divider is a thin line drawn between list items while ttDivider is true.
The start inset of the divider. A divider is a thin line drawn between list items while ttDivider is true.
The thickness of the divider. A divider is a thin line drawn between list items while ttDivider is true.
Draws the divider below the last item in the list or not. A divider is a thin line drawn between list items while ttDivider is true.
The maximum number of rows of the view. When provided, if there are more elements in the ttContents only first elements within the number will be displayed. Otherwise all elements are displayed. If this is not set, all elements will be displayed.