OnItemVisibilityChangedDelegate


@CarProtocol
interface OnItemVisibilityChangedDelegate


A host-side delegate for sending androidx.car.app.model.ItemList.OnItemVisibilityChangedListener events to the car app.

Summary

Public functions

Unit
sendItemVisibilityChanged(
    startIndex: Int,
    endIndex: Int,
    callback: OnDoneCallback
)

Notifies that the items in the list within the specified indices have become visible.

Public functions

sendItemVisibilityChanged

Added in 1.0.0
fun sendItemVisibilityChanged(
    startIndex: Int,
    endIndex: Int,
    callback: OnDoneCallback
): Unit

Notifies that the items in the list within the specified indices have become visible.

The start index is inclusive, and the end index is exclusive. For example, if only the first item in a list is visible, the start and end indices would be 0 and 1, respectively. If no items are visible, the indices will be set to -1.

Parameters
startIndex: Int

the index (inclusive) of the first visible element, or -1 if no items are visible

endIndex: Int

the index (exclusive) of the last visible element, or -1 if no items are visible

callback: OnDoneCallback

the OnDoneCallback to trigger when the client finishes handling the event