TtListRecyclerView
A reusable RecyclerView control that displays view items as a list.
The content is populated by the derived ListItemViewModels and can be set by providing either of:
A List of ListItemViewModel.
A PagingData of ListItemViewModel. See TtListRecyclerView.setListItems.
This control provides an optional sticky header. The sticky header is a header view which is always shown on the top of the RecyclerView and doesn't disappear. It shows the content of the appropriate header while scrolling.
All theme attributes used by this control are declared in com.tomtom.tools.android.core.theme
. To use this control, it is mandatory to define these attribute values.
Parameters
The display context.
The attribute set provided in the layout XML file.
The default style attribute set.
Constructors
Properties
Shows the sticky header when set to true
. The default value is false
. The sticky header is a header view which is always shown on the top of the RecyclerView and doesn't disappear. It shows the content of the appropriate header while scrolling.
The creator of the views of type ListItemViewModel.ListItemType.CONTENT. Can be used to customize the appearance of the views.
The creator of the views of type ListItemViewModel.ListItemType.HEADER. Can be used to customize the appearance of the views.
Inherited properties
Functions
Inherited functions
Extensions
Provides ListItemViewModels to populate items in TtListRecyclerView. When all ViewModels are known in advance and won't change dynamically, put them in a List and set it using this method. If ViewModels are loaded dynamically, e.g. from local storage or over network, use the PagingData version of this method instead.
Used to provide the view with paging information to populate the TtListRecyclerView. This paging information consists of ListItemViewModels representing the actual items in TtListRecyclerViews.