Composable Function

rememberRemotePageIndicatorState

Creates and remembers a RemotePageIndicatorState.

rememberRemotePageIndicatorState

Source set: Android
@Composable
public fun rememberRemotePageIndicatorState(
    @IntRange(from = 0) pageCount: Int,
    selectedPage: RemoteInt = 0.ri,
    pageOffset: RemoteFloat = 0f.rf,
): RemotePageIndicatorState

Creates and remembers a RemotePageIndicatorState.

Example of remembering state for a RemoteHorizontalPageIndicator:

Parameters

pageCount Total number of pages (must be non-negative).
selectedPage The currently selected page index.
pageOffset The current offset from the start of the selected page, as a ratio of the page width.

Return

the remembered RemotePageIndicatorState

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: