Builder
class Builder
A builder used to construct a KeylineState.
KeylineState.Builder enforces the following rules:
- There must be one or more keylines marked as "focal". These are keylines along the scrolling axis where an item or items are considered fully unmasked and viewable.
- Focal keylines must be added adjacent to each other. A non-focal keyline cannot be added between focal keylines.
- A keyline's masked item size can only remain the same size or increase in size as it approaches the focal range. A keyline's masked item size before the focal range cannot be larger than a focal keyline's masked item size.
- A keyline's masked item size can only remain the same size or decrease in size as it moves away from the focal range. A keyline's masked item size after the focal range cannot be larger than a focal keyline's masked item size.
Constructors
Link copied to clipboard
Creates a new KeylineState.Builder.
Functions
Link copied to clipboard
@CanIgnoreReturnValue
Adds an anchor keyline along the scrolling axis where an object should be masked by the given
mask and positioned at offsetLoc.Link copied to clipboard
@CanIgnoreReturnValue
@CanIgnoreReturnValue
Adds a non-anchor keyline along the scrolling axis where an object should be masked by the given
mask and positioned at offsetLoc.@CanIgnoreReturnValue
@CanIgnoreReturnValue
@CanIgnoreReturnValue
Adds a keyline along the scrolling axis where an object should be masked by the given
mask and positioned at offsetLoc.Link copied to clipboard
@CanIgnoreReturnValue
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).@CanIgnoreReturnValue
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).Link copied to clipboard
Builds and returns a KeylineState.