Package com. google. accompanist. pager
Types
Link copied to clipboard
Link copied to clipboard
Contains the default values used by HorizontalPager and VerticalPager.
Link copied to clipboard
Scope for HorizontalPager content.
Link copied to clipboard
A state object that can be hoisted to control and observe scrolling for HorizontalPager.
Functions
Link copied to clipboard
Calculate the offset for the given page from the current scroll position. This is useful when using the scroll position to apply effects or animations to items.
Link copied to clipboard
fun HorizontalPager( count: Int, modifier: Modifier = Modifier, state: PagerState = rememberPagerState(), reverseLayout: Boolean = false, itemSpacing: Dp = 0.dp, contentPadding: PaddingValues = PaddingValues(0.dp), verticalAlignment: Alignment.Vertical = Alignment.CenterVertically, flingBehavior: FlingBehavior = PagerDefaults.flingBehavior(
state = state,
endContentPadding = contentPadding.calculateEndPadding(LayoutDirection.Ltr),
), key: (page: Int) -> Any? = null, content: @Composable PagerScope.(page: Int) -> Unit)
Content copied to clipboard
A horizontally scrolling layout that allows users to flip between items to the left and right.
Link copied to clipboard
Creates a PagerState that is remembered across compositions.
Link copied to clipboard
fun VerticalPager( count: Int, modifier: Modifier = Modifier, state: PagerState = rememberPagerState(), reverseLayout: Boolean = false, itemSpacing: Dp = 0.dp, contentPadding: PaddingValues = PaddingValues(0.dp), horizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally, flingBehavior: FlingBehavior = PagerDefaults.flingBehavior(
state = state,
endContentPadding = contentPadding.calculateBottomPadding(),
), key: (page: Int) -> Any? = null, content: @Composable PagerScope.(page: Int) -> Unit)
Content copied to clipboard
A vertically scrolling layout that allows users to flip between items to the top and bottom.