ScalingLazyColumnDefaults

Default layouts for ScalingLazyColumnState, based on UX guidance.

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun belowTimeText(rotaryMode: ScalingLazyColumnState.RotaryMode = RotaryMode.Scroll, firstItemIsFullWidth: Boolean = false, verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy( space = 4.dp, alignment = Alignment.Top, ), horizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally, contentPadding: PaddingValues = PaddingValues(horizontal = 10.dp), topPaddingDp: Dp = 32.dp + (if (firstItemIsFullWidth) 20.dp else 0.dp)): ScalingLazyColumnState.Factory

Layout the first item, directly under the time text. This is positioned from the top of the screen instead of the center.

Link copied to clipboard
Link copied to clipboard
fun padding(first: ScalingLazyColumnDefaults.ItemType = ItemType.Unspecified, last: ScalingLazyColumnDefaults.ItemType = ItemType.Unspecified, horizontalPercent: Float = 0.052f): @Composable () -> PaddingValues
Link copied to clipboard
fun responsive(firstItemIsFullWidth: Boolean = true, additionalPaddingAtBottom: Dp = 10.dp, verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy( space = 4.dp, alignment = Alignment.Top, ), horizontalPaddingPercent: Float = 0.052f, rotaryMode: ScalingLazyColumnState.RotaryMode? = RotaryMode.Scroll, hapticsEnabled: Boolean = true, reverseLayout: Boolean = false, userScrollEnabled: Boolean = true): ScalingLazyColumnState.Factory

Creates a Responsive layout for ScalingLazyColumn. The first and last items will scroll just onto screen at full size, assuming rounded corners of a Chip.

Link copied to clipboard
Link copied to clipboard
fun scalingLazyColumnDefaults(rotaryMode: ScalingLazyColumnState.RotaryMode = RotaryMode.Scroll, initialCenterIndex: Int = 1, initialCenterOffset: Int = 0, verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy( space = 4.dp, alignment = Alignment.Top, ), horizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally, contentPadding: PaddingValues = PaddingValues(horizontal = 10.dp), autoCentering: AutoCenteringParams? = AutoCenteringParams( initialCenterIndex, initialCenterOffset, ), anchorType: ScalingLazyListAnchorType = ScalingLazyListAnchorType.ItemCenter, hapticsEnabled: Boolean = true, reverseLayout: Boolean = false, userScrollEnabled: Boolean = true): ScalingLazyColumnState.Factory

Layout the item initialCenterIndex at initialCenterOffset from the center of the screen.