PagerProgressBar

fun PagerProgressBar(pagerState: PagerState, modifier: Modifier = Modifier, buttonColours: ButtonColours = DefaultButtonColours, disabledButtonColours: ButtonColours? = disabledModeButtonColours(buttonColours), selectedIndicatorColour: AppColour = DefaultSelectedIndicatorColour, unSelectedIndicatorColour: AppColour = DefaultUnSelectedIndicatorColour, prevButtonContentDescription: String? = null, nextButtonContentDescription: String? = null, showProgressButtons: Boolean = isTabletDevice())

A progress bar that shows the current page of a PagerState and, on tablets, allows the user to navigate between pages using next/prev buttons.

Parameters

pagerState

The PagerState that this indicator should be bound to.

modifier
buttonColours

The colours for the next/prev buttons.

disabledButtonColours

The colours for the next/prev buttons when they are disabled.

selectedIndicatorColour

The colour of the selected indicator item.

unSelectedIndicatorColour

The colour of the unselected indicators items.

prevButtonContentDescription

The content description for the previous button.

nextButtonContentDescription

The content description for the next button.

showProgressButtons

Whether to show the next/prev buttons. By default they are enabled on tablet devices (sw600dp). This is only used when the user uses prev/next buttons to navigate between pages.

Samples

AnimatedPreview
fun PagerProgressBar(pagerState: PagerState, buttonPriority: SourceButton.Priority, modifier: Modifier = Modifier, selectedIndicatorColour: AppColour = DefaultSelectedIndicatorColour, unSelectedIndicatorColour: AppColour = DefaultUnSelectedIndicatorColour, prevButtonContentDescription: String? = null, nextButtonContentDescription: String? = null, showProgressButtons: Boolean = isTabletDevice())

A progress bar that shows the current page of a PagerState and, on tablets, allows the user to navigate between pages using next/prev buttons.

Parameters

pagerState

The PagerState that this indicator should be bound to.

buttonPriority

The priority for the next previous buttons. Priority decides the button colours.

modifier
selectedIndicatorColour

The colour of the selected indicator item.

unSelectedIndicatorColour

The colour of the unselected indicators items.

prevButtonContentDescription

The content description for the previous button.

nextButtonContentDescription

The content description for the next button.

showProgressButtons

Whether to show the next/prev buttons. By default they are enabled on tablet devices (sw600dp). This is only used when the user uses prev/next buttons to navigate between pages.