Composable Function

rememberSearchBarScrollState

Creates a SearchBarScrollState that is remembered across compositions.

rememberSearchBarScrollState

Source set: Common
@Composable
public fun rememberSearchBarScrollState(
    initialScrollOffsetLimit: Float = -Float.MAX_VALUE,
    initialScrollOffset: Float = 0f,
    initialContentOffset: Float = 0f,
): SearchBarScrollState

Creates a SearchBarScrollState that is remembered across compositions.

Parameters

initialScrollOffsetLimit the initial value for SearchBarScrollState.scrollOffsetLimit, which represents the pixel limit that a search bar is allowed to scroll off-screen when the content is scrolled.
initialScrollOffset the initial value for SearchBarScrollState.scrollOffset. The initial offset should be between initialScrollOffsetLimit and 0.
initialContentOffset the initial value for SearchBarScrollState.contentOffset.
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: