-
public final class AccumulatedRotaryInputModifierKt
-
-
Method Summary
Modifier and Type Method Description final static ModifieronRotaryInputAccumulatedWithFocus(Modifier $self, FocusRequester focusRequester, Boolean isLowRes, Function1<Float, Unit> onValueChange)A focusable modifier that accumulates the scroll distances from RotaryScrollEvent and notifies changes with onValueChange once accumulated value is over the thresholds. final static ModifieronRotaryInputAccumulated(Modifier $self, Long eventAccumulationThresholdMs, Float minValueChangeDistancePx, Long rateLimitCoolDownMs, Boolean isLowRes, Function1<Float, Unit> onValueChange)Accumulates the scroll distances from RotaryScrollEvent and notifies changes with onValueChange once accumulated value is over the thresholds. final static RotaryScrollableBehavioraccumulatedBehavior(Long eventAccumulationThresholdMs, Float minValueChangeDistancePx, Long rateLimitCoolDownMs, Function1<Float, Unit> onValueChange)-
-
Method Detail
-
onRotaryInputAccumulatedWithFocus
final static Modifier onRotaryInputAccumulatedWithFocus(Modifier $self, FocusRequester focusRequester, Boolean isLowRes, Function1<Float, Unit> onValueChange)
A focusable modifier that accumulates the scroll distances from RotaryScrollEvent and notifies changes with onValueChange once accumulated value is over the thresholds.
- Parameters:
focusRequester- requests for focus for the rotaryonValueChange- callback invoked once accumulated value is over the thresholds.
-
onRotaryInputAccumulated
final static Modifier onRotaryInputAccumulated(Modifier $self, Long eventAccumulationThresholdMs, Float minValueChangeDistancePx, Long rateLimitCoolDownMs, Boolean isLowRes, Function1<Float, Unit> onValueChange)
Accumulates the scroll distances from RotaryScrollEvent and notifies changes with onValueChange once accumulated value is over the thresholds.
- Parameters:
eventAccumulationThresholdMs- time threshold below which events are accumulated.minValueChangeDistancePx- minimum distance for value change in pixels.rateLimitCoolDownMs- cool down time when rate limiting is enabled, negative value disables.isLowRes- resolution of the device's rotary control.onValueChange- callback invoked once accumulated value is over the thresholds.
-
-
-
-