Composable Function

rememberGlimmerPagerState

Creates and remembers a GlimmerPagerState to be used with a GlimmerHorizontalPager.

rememberGlimmerPagerState

Source set: Android
@Composable
public fun rememberGlimmerPagerState(
    @IntRange(from = 0) initialPage: Int = 0,
    @FloatRange(from = -0.5, to = 0.5) initialPageOffsetFraction: Float = 0f,
    pageCount: () -> Int,
): GlimmerPagerState

Creates and remembers a GlimmerPagerState to be used with a GlimmerHorizontalPager.

Parameters

initialPage the initial page to be displayed. Defaults to 0.
initialPageOffsetFraction The offset of the initial page as a fraction of the page size. This should vary between -0.5 and 0.5 and indicates how to offset the initial page from the snapped position.
pageCount a lambda returning the total number of pages in the pager.
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: