Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

ListItemProvider.ListProvider

public static class ListItemProvider.ListProvider
extends ListItemProvider

java.lang.Object
   ↳ androidx.car.widget.ListItemProvider
     ↳ androidx.car.widget.ListItemProvider.ListProvider<VH extends androidx.car.widget.ListItem.ViewHolder>


A simple provider that wraps around a list.

Summary

Public constructors

ListItemProvider.ListProvider(List<ListItem<VH>> items)

Public methods

ListItem<VH> get(int position)

Returns ListItem at requested position.

int size()

Inherited methods

Public constructors

ListItemProvider.ListProvider

public ListItemProvider.ListProvider (List<ListItem<VH>> items)

Parameters
items List

Public methods

get

public ListItem<VH> get (int position)

Returns ListItem at requested position.

Parameters
position int

Returns
ListItem<VH>

size

public int size ()

Returns
int number of total items.