Package-level declarations

Types

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

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

Link copied to clipboard
class ListItemHeaderViewModel(val itemId: Any, val icon: ImageSource? = null, val text: StringResolver? = null) : ListItemViewModel

The ViewModel for populating a header item in a TtListRecyclerView.

Link copied to clipboard

The ViewModel for an item in a TtListRecyclerView.

Link copied to clipboard
class StickyHeaderSnapHelper(adapter: ListGroupItemsCollection<out ListGroupItem>, maxFlingVelocityPx: Int? = null, createScroller: (Context) -> Scroller = { Scroller(it, DecelerateInterpolator()) }) : 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? = null, defStyleAttr: Int = CoreThemeR.attr.tt_listrecyclerview_style) : RecyclerView

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

Link copied to clipboard

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

Functions

Link copied to clipboard

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

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