ListDelegate


@ExperimentalCarApi
public interface ListDelegate<T extends Object>


A host-side interface, for querying portions of a long list.

Long lists are stored on the client for performance reasons.

Summary

Public methods

abstract int

The size of the underlying List

abstract void
requestItemRange(
    int startIndex,
    int endIndex,
    @NonNull OnDoneCallback callback
)

Host-side interface for requesting items in range [startIndex, endIndex] (both inclusive).

Public methods

getSize

Added in 1.7.0-beta03
abstract int getSize()

The size of the underlying List

requestItemRange

Added in 1.7.0-beta03
abstract void requestItemRange(
    int startIndex,
    int endIndex,
    @NonNull OnDoneCallback callback
)

Host-side interface for requesting items in range [startIndex, endIndex] (both inclusive).

The sublist is returned to the host as a List, via OnDoneCallback.onSuccess on the main thread.