ListItemProvider

abstract class ListItemProvider<VH : ListItem.ViewHolder!>
kotlin.Any
   ↳ androidx.car.widget.ListItemProvider

Supplies data as ListItem.

Summary

Nested classes

open

A simple provider that wraps around a list.

Public constructors

Supplies data as ListItem.

Public methods

abstract ListItem<VH>
get(position: Int)

Returns ListItem at requested position.

abstract Int

Public constructors

<init>

ListItemProvider()

Supplies data as ListItem.

Public methods

get

@NonNull abstract fun get(position: Int): ListItem<VH>

Returns ListItem at requested position.

size

abstract fun size(): Int
Return
Int: number of total items.