Package 

Class AccumulatedRotaryInputModifierKt

    • Method Summary

      Modifier and Type Method Description
      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.
      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.
      final static RotaryScrollableBehavior accumulatedBehavior(Long eventAccumulationThresholdMs, Float minValueChangeDistancePx, Long rateLimitCoolDownMs, Function1<Float, Unit> onValueChange)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 rotary
        onValueChange - 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.
      • accumulatedBehavior

         final static RotaryScrollableBehavior accumulatedBehavior(Long eventAccumulationThresholdMs, Float minValueChangeDistancePx, Long rateLimitCoolDownMs, Function1<Float, Unit> onValueChange)