Package com.tomtom.tools.android.api.uicontrols.recyclerview

Types

Link copied to clipboard
open class ListItemContentViewModel(itemId: Any, headImage: ImageDescriptor?, primaryTextArea: ListItemContentViewModel.TextAreaViewModel, secondaryTextArea: ListItemContentViewModel.TextAreaViewModel, tertiaryTextArea: ListItemContentViewModel.TextAreaViewModel, onClick: () -> Unit?, ratingBarValue: Float?, ratingBarMaximumValue: Int, ratingBarText: StringResolver?, tailText: StringResolver?, tailIcon: DrawableResolver?, onTailSectionClick: () -> Unit?) : ListItemViewModel

The ViewModel for populating the content of a non-header item in a TtListRecyclerView.

Link copied to clipboard
class ListItemHeaderViewModel(itemId: Any, icon: DrawableResolver?, text: StringResolver?) : ListItemViewModel

The ViewModel for populating a header item in a TtListRecyclerView.

Link copied to clipboard
sealed class ListItemViewModel : IndicatorContentProvider

The ViewModel for an item in a TtListRecyclerView.

Link copied to clipboard
class StickyHeaderSnapHelper(adapter: ListGroupItemsCollection<out ListGroupItem>, maxFlingVelocityPx: Int?, createScroller: (Context) -> Scroller) : LinearSnapHelper

A LinearSnapHelper, which should be used with ListGroupItemsCollection to supports sticky headers in vertical orientation. To have the sticky header in the RecyclerView, StickyHeaderDecoration needs be added to it. In the normal situation, the implementation will snap the RecyclerView to the top. It will find the target view and its top will be snapped to the bottom of the header. However, if the last item in the RecyclerView is visible and it is more close to the bottom than to the top, the RecyclerView will be snapped to the bottom instead of to the top.

Link copied to clipboard
open class TtListRecyclerView @JvmOverloads constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : RecyclerView

A reusable RecyclerView control that displays view items as a list.

Link copied to clipboard
sealed class TtListRecyclerViewItemGroup

Represents a group of recycler view items that can be a:

Functions

Link copied to clipboard
fun TtListRecyclerView.setListItems(listItems: List<ListItemViewModel>?)

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.

Link copied to clipboard
fun TtListRecyclerView.setPagingData(pagingData: Flow<PagingData<ListItemViewModel>>?)

Used to provide the view with paging information to populate the TtListRecyclerView. This paging information consists of ListItemViewModels representing the actual items in TtListRecyclerViews.