Function

scrollBy

Action to asynchronously scroll by a specified amount.

scrollBy

Source set: Common
public fun SemanticsPropertyReceiver.scrollBy(
    label: String? = null,
    action: ((x: Float, y: Float) -> Boolean)?,
): Unit

Action to asynchronously scroll by a specified amount.

scrollByOffset should be preferred in most cases, since it is synchronous and returns the amount of scroll that was actually consumed.

Expected to be used in conjunction with verticalScrollAxisRange/horizontalScrollAxisRange.

Parameters

label Optional label for this action.
action Action to be performed when SemanticsActions.ScrollBy is called.
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: