ParallaxActionsScope

Receiver of the actions slot: a RowScope that also exposes the toolbar scope.

Properties

Link copied to clipboard

0f while fully expanded, 1f once fully collapsed.

Link copied to clipboard
Link copied to clipboard

Measured geometry of the layout; see ParallaxToolbarLayoutInfo.

Link copied to clipboard

The layout's state, for ParallaxToolbarState.collapse and friends.

Functions

Link copied to clipboard
abstract fun Modifier.align(alignment: Alignment.Vertical): Modifier
Link copied to clipboard
abstract fun Modifier.alignBy(alignmentLineBlock: (Measured) -> Int): Modifier
Link copied to clipboard
Link copied to clipboard
open fun Modifier.fadeOnCollapse(expandedAlpha: Float = 1.0f, collapsedAlpha: Float = 0.0f): Modifier

Interpolates the element's alpha from expandedAlpha to collapsedAlpha with the collapse.

Link copied to clipboard
open fun Modifier.moveBetween(expanded: Alignment, collapsed: Alignment, expandedPadding: PaddingValues = PaddingValues(0.dp), collapsedPadding: PaddingValues = PaddingValues(0.dp), collapsedScale: Float = 1.0f): Modifier

Glides the element from its place in the expanded header to its place in the toolbar, scaling toward collapsedScale on the way. Meant for the overlayContent slot, whose elements sit above the body and the toolbar, so the element stays visible once collapsed.

Link copied to clipboard
open fun Modifier.parallax(ratio: Float = ParallaxToolbarDefaults.HeaderParallaxMultiplier): Modifier

Moves the element up by ratio of the collapse distance as the header collapses. 0f keeps it still, 1f moves it with the body. Pair with headerConfig(parallaxMultiplier = 0f) when elements should each set their own ratio.

Link copied to clipboard
open fun Modifier.pin(stopAtTop: Boolean = false): Modifier

Keeps the element in view while the header collapses: it stays put until the header's bottom edge reaches it, then rides up with that edge. For elements at the bottom of the header, such as a search field or a chip row, that should stay visible for as long as possible. The element ignores the header's parallaxMultiplier.

Link copied to clipboard
open fun Modifier.scaleOnCollapse(collapsedScale: Float, origin: TransformOrigin = TransformOrigin.Center): Modifier

Scales the element toward collapsedScale about origin as the header collapses.

Link copied to clipboard
abstract fun Modifier.weight(@FloatRange(from = 0.0, fromInclusive = false) weight: Float, fill: Boolean): Modifier