addKeylineRange

@CanIgnoreReturnValue
open fun addKeylineRange(offsetLoc: Float, @FloatRange(from = 0.0, to = 1.0) mask: Float, maskedItemSize: Float, count: Int): KeylineState.Builder

Adds a range of keylines along the scrolling axis where an item should be masked by mask when its center is between offsetLoc and offsetLoc + (maskedItemSize * count).

See also


@CanIgnoreReturnValue
open fun addKeylineRange(offsetLoc: Float, @FloatRange(from = 0.0, to = 1.0) mask: Float, maskedItemSize: Float, count: Int, isFocal: Boolean): KeylineState.Builder

Adds a range along the scrolling axis where an object should be masked by mask when its center is between offsetLoc and offsetLoc + (maskedItemSize * count).

Note that calls to addKeyline and addKeylineRange are added in order. Typically, this means keylines should be added in order of ascending offsetLoc.

Parameters

offsetLoc

the location along the scrolling axis where this range starts. The range's end will be defined by offsetLoc + (maskedItemSize * count). An offsetLoc of 0 will be at the start of the scrolling container.

mask

the percentage of a child's full size that it should be masked by when its center is within the keyline range. 0 is fully unmasked and 1 is fully masked.

maskedItemSize

the total size of this item when masked. This might differ from itemSize - (itemSize * mask) depending on how margins are included in the mask.

count

The number of items that should be in this range at a time.

isFocal

whether this keyline range is the focal range. Typically this is when mask is equal to 0.