GlimmerHorizontalPagerDefaults

object GlimmerHorizontalPagerDefaults


Default values and helper methods to be used with the GlimmerHorizontalPager.

Summary

Public functions

Unit

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

Unit
@Composable
PageIndicator(
    state: GlimmerPagerState,
    selectedIndicatorColor: Color,
    unselectedIndicatorColor: Color,
    modifier: Modifier
)

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

Public functions

PageIndicator

Added in 1.0.0-alpha23
@Composable
fun PageIndicator(state: GlimmerPagerState, modifier: Modifier = Modifier): Unit

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

The color of the dot indicating the currently selected page is extracted by retrieving the content color from the nearest surface, while the remaining dots use a less prominent, opaque shade of the content color. To provide custom colors, see the overload of PageIndicator with additional color parameters

Parameters
state: GlimmerPagerState

state object to be used to observe the Pager's state

modifier: Modifier = Modifier

modifier to be applied to the page indicator

PageIndicator

Added in 1.0.0-alpha23
@Composable
fun PageIndicator(
    state: GlimmerPagerState,
    selectedIndicatorColor: Color,
    unselectedIndicatorColor: Color,
    modifier: Modifier = Modifier
): Unit

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

This version of the indicator supports passing in a selectedIndicatorColor to color the dot representing the currently selected page, while the remaining dots are colored with unselectedIndicatorColor

Parameters
state: GlimmerPagerState

state object to be used to observe the Pager's state

selectedIndicatorColor: Color

color of the selected page indicator dot

unselectedIndicatorColor: Color

color of the unselected page indicator dots

modifier: Modifier = Modifier

modifier to be applied to the page indicator