ImagePreviewerState

class ImagePreviewerState(var scope: CoroutineScope = MainScope(), var defaultAnimationSpec: AnimationSpec<Float> = DEFAULT_SOFT_ANIMATION_SPEC, val galleryState: ImageGalleryState, var itemStateMap: ItemStateMap) : PreviewerVerticalDragState

Deprecated

com.origeek.imageViewer下的全部类和方法均已弃用! 请使用新版本:com.jvziyaoyao.viewer。

预览组件的状态

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope = MainScope(), defaultAnimationSpec: AnimationSpec<Float> = DEFAULT_SOFT_ANIMATION_SPEC, galleryState: ImageGalleryState, itemStateMap: ItemStateMap)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

+-------------------+ PUBLIC +-------------------+

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

当前页码

Link copied to clipboard
Link copied to clipboard
var getKey: (Int) -> Any?

根据页面获取当前页码所属的key

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

下拉关闭的缩放的阈值,当scale小于这个值,就关闭,否则还原

Link copied to clipboard
var scope: CoroutineScope
Link copied to clipboard

目标页码

Link copied to clipboard

开启垂直手势的类型

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun animateScrollToPage(@IntRange(from = 0) page: Int, @FloatRange(from = 0.0, to = 1.0) pageOffset: Float = 0.0f)

带动画滚动到指定页面

Link copied to clipboard
Link copied to clipboard
suspend fun close(exitTransition: ExitTransition? = null)

关闭previewer

Link copied to clipboard
suspend fun closeTransform(animationSpec: AnimationSpec<Float> = defaultAnimationSpec)

关闭previewer,带转换效果

Link copied to clipboard
Link copied to clipboard
suspend fun open(index: Int = 0, itemState: TransformItemState? = null, enterTransition: EnterTransition? = null)

打开previewer

Link copied to clipboard
suspend fun openTransform(index: Int, itemState: TransformItemState? = findTransformItemByIndex(index), animationSpec: AnimationSpec<Float> = defaultAnimationSpec)

打开previewer,带转换效果

Link copied to clipboard
suspend fun scrollToPage(@IntRange(from = 0) page: Int, @FloatRange(from = 0.0, to = 1.0) pageOffset: Float = 0.0f)

滚动到指定页面