addKeyline

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

Adds a non-anchor keyline along the scrolling axis where an object should be masked by the given mask and positioned at offsetLoc. Non-anchor keylines shift when keylines shift due to scrolling.

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 of this keyline along the scrolling axis. An offsetLoc of 0 will be at the start of the scroll container.

mask

The percentage of a child's full size that it should be masked by when its center is at offsetLoc. 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.

isFocal

Whether this keyline is considered part of the focal range. Typically, this is when mask is equal to 0.


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

Adds a non-anchor keyline along the scrolling axis where an object should be masked by the given mask and positioned at offsetLoc.

See also


@CanIgnoreReturnValue
open fun addKeyline(offsetLoc: Float, @FloatRange(from = 0.0, to = 1.0) mask: Float, maskedItemSize: Float, isFocal: Boolean, isAnchor: Boolean, cutoff: Float, leftOrTopPaddingShift: Float, rightOrBottomPaddingShift: Float): KeylineState.Builder
@CanIgnoreReturnValue
open fun addKeyline(offsetLoc: Float, @FloatRange(from = 0.0, to = 1.0) mask: Float, maskedItemSize: Float, isFocal: Boolean, isAnchor: Boolean, cutoff: Float): KeylineState.Builder

Adds a keyline along the scrolling axis where an object should be masked by the given mask and positioned at offsetLoc.

Note that calls to addKeyline and addKeylineRange are added in order. Typically, this means keylines should be added in order of ascending offsetLoc. The first and last keylines added are 'anchor' keylines that mark the start and ends of the keylines. These keylines do not shift when scrolled.

Note also that isFocal and isAnchor cannot be true at the same time as anchor keylines refer to keylines offscreen that dictate the ends of the keylines.

Parameters

offsetLoc

The location of this keyline along the scrolling axis. An offsetLoc of 0 will be at the start of the scroll container.

mask

The percentage of a child's full size that it should be masked by when its center is at offsetLoc. 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.

isFocal

Whether this keyline is considered part of the focal range. Typically, this is when mask is equal to 0.

isAnchor

Whether this keyline is an anchor keyline. Anchor keylines do not shift when keylines are shifted.

cutoff

How much the keyline item is out the bounds of the available space.


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

Adds a keyline along the scrolling axis where an object should be masked by the given mask and positioned at offsetLoc. This method also calculates the amount that a keyline may be cut off by the bounds of the available space given.

Note that calls to addKeyline and addKeylineRange are added in order. Typically, this means keylines should be added in order of ascending offsetLoc. The first and last keylines added are 'anchor' keylines that mark the start and ends of the keylines. These keylines do not shift when scrolled.

Note also that isFocal and isAnchor cannot be true at the same time as anchor keylines refer to keylines offscreen that dictate the ends of the keylines.

Parameters

offsetLoc

The location of this keyline along the scrolling axis. An offsetLoc of 0 will be at the start of the scroll container.

mask

The percentage of a child's full size that it should be masked by when its center is at offsetLoc. 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.

isFocal

Whether this keyline is considered part of the focal range. Typically, this is when mask is equal to 0.

isAnchor

Whether this keyline is an anchor keyline. Anchor keylines do not shift when keylines are shifted.