{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ScrollAxisRange

public final class ScrollAxisRange


The scroll state of one axis if this node is scrollable.

Summary

Public constructors

ScrollAxisRange(
    @NonNull Function0<@NonNull Float> value,
    @NonNull Function0<@NonNull Float> maxValue,
    boolean reverseScrolling
)

Public methods

final @NonNull Function0<@NonNull Float>

maximum bound for value, or Float.POSITIVE_INFINITY if still unknown

final boolean

for horizontal scroll, when this is true, 0 value will mean right, whenfalse, 0 value will mean left.

final @NonNull Function0<@NonNull Float>

current 0-based scroll position value (either in pixels, or lazy-item count)

@NonNull String

Public constructors

ScrollAxisRange

public ScrollAxisRange(
    @NonNull Function0<@NonNull Float> value,
    @NonNull Function0<@NonNull Float> maxValue,
    boolean reverseScrolling
)
Parameters
@NonNull Function0<@NonNull Float> value

current 0-based scroll position value (either in pixels, or lazy-item count)

@NonNull Function0<@NonNull Float> maxValue

maximum bound for value, or Float.POSITIVE_INFINITY if still unknown

boolean reverseScrolling

for horizontal scroll, when this is true, 0 value will mean right, whenfalse, 0 value will mean left. For vertical scroll, when this is true, 0 value will mean bottom, when false, 0 value will mean top

Public methods

getMaxValue

public final @NonNull Function0<@NonNull FloatgetMaxValue()

maximum bound for value, or Float.POSITIVE_INFINITY if still unknown

getReverseScrolling

public final boolean getReverseScrolling()

for horizontal scroll, when this is true, 0 value will mean right, whenfalse, 0 value will mean left. For vertical scroll, when this is true, 0 value will mean bottom, when false, 0 value will mean top

getValue

public final @NonNull Function0<@NonNull FloatgetValue()

current 0-based scroll position value (either in pixels, or lazy-item count)

toString

public @NonNull String toString()