Carousel.Adapter

interface Carousel.Adapter


Adapter for a Carousel

Summary

Public methods

abstract @NonNull int

Number of items you want to display in the Carousel

abstract @NonNull void
onNewItem(@NonNull int index)

Callback when we reach a new index

abstract @NonNull void
populate(@NonNull View view, @NonNull int index)

Callback to populate the view for the given index

Public methods

count

@NonNull
public abstract int count()

Number of items you want to display in the Carousel

Returns
int

number of items

onNewItem

@NonNull
public abstract void onNewItem(@NonNull int index)

Callback when we reach a new index

Parameters
@NonNull int index

populate

@NonNull
public abstract void populate(@NonNull View view, @NonNull int index)

Callback to populate the view for the given index

Parameters
@NonNull View view
@NonNull int index