Package-level declarations

Types

Link copied to clipboard
class PagerGestureScope(var onTap: () -> Unit = {}, var onDoubleTap: () -> Boolean = { false }, var onLongPress: () -> Unit = {})

Pager的点击事件监听对象

Link copied to clipboard

在ZoomablePager中对ZoomableView图层进行修饰对对象

Link copied to clipboard
open class SupportedPagerState constructor(val pagerState: PagerState)

基于HorizonPager封装的pager组件

Link copied to clipboard
open class ZoomablePagerState(val pagerState: SupportedPagerState)

用于获取ZoomablePager的状态和对其进行控制

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun rememberSupportedPagerState(@IntRange(from = 0) initialPage: Int = 0, pageCount: () -> Int): SupportedPagerState

用于获取pager状态和控制pager

Link copied to clipboard
fun rememberZoomablePagerState(@IntRange(from = 0) initialPage: Int = 0, pageCount: () -> Int): ZoomablePagerState

在Compose中获取一个ZoomablePagerState

Link copied to clipboard
fun SupportedHorizonPager(modifier: Modifier = Modifier, state: SupportedPagerState, itemSpacing: Dp = 0.dp, beyondViewportPageCount: Int = 0, userScrollEnabled: Boolean = true, content: @Composable (page: Int) -> Unit)

一个通用pager组件,对底层对pager进行了封装

Link copied to clipboard
fun ZoomablePager(modifier: Modifier = Modifier, state: ZoomablePagerState, itemSpacing: Dp = DEFAULT_ITEM_SPACE, beyondViewportPageCount: Int = DEFAULT_BEYOND_VIEWPORT_ITEM_COUNT, userScrollEnabled: Boolean = true, detectGesture: PagerGestureScope = PagerGestureScope(), zoomablePolicy: @Composable PagerZoomablePolicyScope.(page: Int) -> Unit)

基于Pager和ZoomableView实现的一个图片查看列表组件