Added in 1.5.0-alpha17
@ExperimentalMaterial3Api
sealed interface MultiAspectCarouselItemDrawInfo
Interface to hold information about a multi-aspect carousel item and its draw info that change as the item scrolls.
Example of MultiAspectCarouselItemDrawInfo usage:
Properties
index
Added in 1.5.0-alpha17
val index: Int
The index of this item in the list.
size
Added in 1.5.0-alpha17
@get:FrequentlyChangingValue val size: Float
The current size of this item in the main scrolling axis taking into account any masking from maskStart and maskEnd.
minSize
Added in 1.5.0-alpha17
val minSize: Float
The smallest size this item will ever be masked to in the main scrolling axis. size will never be less than minSize.
maxSize
Added in 1.5.0-alpha17
val maxSize: Float
The maximum size this item will be in the main scrolling axis. This is the fully unmasked size of the item with no mask applied. size will never be greater than maxSize.
maskStart
Added in 1.5.0-alpha17
@get:FrequentlyChangingValue val maskStart: Float
The offset in pixels from the start of this item's bounds by which the item should be masked.
When this item exists the start or top of the viewport, maskStart will increase to make it look like this item is being squeezed against the edge of the viewport.
maskEnd
Added in 1.5.0-alpha17
@get:FrequentlyChangingValue val maskEnd: Float
The offset in pixels from the end of this item's bounds by which the item should be masked.
When this item exists the end or bottom of the viewport, maskEnd will increase to make it look like this item is being squeezed against the edge of the viewport.
parallax
Added in 1.5.0-alpha17
@get:FrequentlyChangingValue val parallax: Float
The distance in pixels to translate this item's content in the main scrolling axis.
When an item is exiting the viewport, parallax will translate the content in the opposite direction of scroll, making it look like the item is moving more slowly and being compressed against the edge of the viewport.
isHorizontal
Added in 1.5.0-alpha17
val isHorizontal: Boolean
True if the main scrolling axis is horizontal.