PickerDefaults
object PickerDefaults
Contains the default values used by Picker
Summary
Public functions |
|
|---|---|
ScalingParams |
defaultScalingParams(Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. |
FlingBehavior |
@ComposableCreate and remember a |
ScalingParams |
This function is deprecated. This overload is provided for backwards compatibility with Compose for Wear OS 1.1 and was deprecated. |
Public properties |
|
|---|---|
Float |
Default Picker gradient ratio - the proportion of the Picker height allocated to each of the of the top and bottom gradients. |
Public functions
defaultScalingParams
fun defaultScalingParams(
edgeScale: Float = 0.45f,
edgeAlpha: Float = 1.0f,
minElementHeight: Float = 0.0f,
maxElementHeight: Float = 0.0f,
minTransitionArea: Float = 0.45f,
maxTransitionArea: Float = 0.45f,
scaleInterpolator: Easing = CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f),
viewportVerticalOffsetResolver: (Constraints) -> Int = { (it.maxHeight / 5f).toInt() }
): ScalingParams
Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. For details, see ScalingParams
flingBehavior
@Composable
fun flingBehavior(
state: PickerState,
decay: DecayAnimationSpec<Float> = exponentialDecay()
): FlingBehavior
Create and remember a FlingBehavior that will represent natural fling curve with snap to central item as the fling decays.
| Parameters | |
|---|---|
state: PickerState |
the state of the |
decay: DecayAnimationSpec<Float> = exponentialDecay() |
the decay to use |
funscalingParams(
edgeScale: Float = 0.45f,
edgeAlpha: Float = 1.0f,
minElementHeight: Float = 0.0f,
maxElementHeight: Float = 0.0f,
minTransitionArea: Float = 0.45f,
maxTransitionArea: Float = 0.45f,
scaleInterpolator: Easing = CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f),
viewportVerticalOffsetResolver: (Constraints) -> Int = { (it.maxHeight / 5f).toInt() }
): ScalingParams
Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. For details, see ScalingParams
Public properties
DefaultGradientRatio
val DefaultGradientRatio: Float
Default Picker gradient ratio - the proportion of the Picker height allocated to each of the of the top and bottom gradients.