Object

PickerDefaults

Contains the default values used by Picker

Source set: Android
public object PickerDefaults

Contains the default values used by Picker

Properties

DefaultGradientRatio

Source set: Android
public val DefaultGradientRatio: Float = 0.33f

Default Picker gradient ratio - the proportion of the Picker height allocated to each of the top and bottom gradients.

Functions

scalingParams

Source set: Android
@Deprecated(
        "This overload is provided for backwards compatibility with Compose for" +
            " Wear OS 1.1 and was deprecated. Use [defaultScalingParams] instead",
        replaceWith =
            ReplaceWith(
                "PickerDefaults.defaultScalingParams(edgeScale," +
                    " edgeAlpha, minElementHeight, maxElementHeight, minTransitionArea, " +
                    "maxTransitionArea, scaleInterpolator, viewportVerticalOffsetResolver)"
            ),
        level = DeprecationLevel.WARNING,
    )
    public fun scalingParams(
        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() },
    ): androidx.wear.compose.material.ScalingParams

Scaling params are used to determine when items start to be scaled down and alpha applied, and how much. For details, see ScalingParams

defaultScalingParams

Source set: Android
public 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

Source set: Android
@Composable
    public 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 the state of the Picker
decay the decay to use
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: