MultiBrowseCarouselStrategy

A CarouselStrategy that knows how to size and fit large, medium and small items into a container to create a layout for quick browsing of multiple items at once.

Note that this strategy will adjust the size of large items. In order to ensure large, medium, and small items both fit perfectly into the available space and are numbered/arranged in a visually pleasing and opinionated way, this strategy finds the nearest number of large items that will fit into an approved arrangement that requires the least amount of size adjustment necessary.

This class will automatically be reversed by CarouselLayoutManager if being laid out right-to-left and does not need to make any account for layout direction itself.

For more information, see the component developer guidance and design guidelines.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Calculates a keyline arrangement and returns a constructed KeylineState.
Link copied to clipboard
open fun shouldRefreshKeylineState(@NonNull carousel: Carousel, oldItemCount: Int): Boolean
Whether or not the strategy keylines should be refreshed based on the old item count and the carousel's current parameters.