SpreadSwipeRendererOptions

data class SpreadSwipeRendererOptions(val animationDurationMs: Double? = null, val direction: Axis = Axis.X, val disableAnimations: Boolean = false, val enablePageSpreadCenterSupport: Boolean = true, val goToAnimationDurationMs: Int? = null, val ignoreAspectRatio: Boolean = false, val insets: RectMargins? = null, val minMarginBetweenSpreads: Int = 24, val pageBackgroundColor: String = "transparent", val rubberBandElasticity: Double = 0.65, val swipeNavigationGestureThreshold: Length? = null, val useWindowDimensionsForPageContainers: Boolean = true)

Options used with the SpreadSwipeRenderer.

Constructors

Link copied to clipboard
constructor(animationDurationMs: Double? = null, direction: Axis = Axis.X, disableAnimations: Boolean = false, enablePageSpreadCenterSupport: Boolean = true, goToAnimationDurationMs: Int? = null, ignoreAspectRatio: Boolean = false, insets: RectMargins? = null, minMarginBetweenSpreads: Int = 24, pageBackgroundColor: String = "transparent", rubberBandElasticity: Double = 0.65, swipeNavigationGestureThreshold: Length? = null, useWindowDimensionsForPageContainers: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

How long the animations to next/previous will be. Default is null which will use specific values dependent on the presentation mode and platform types: 'mobile', 'tablet' or 'desktop'.

Link copied to clipboard

The swipe direction to use. Default value is Axis.X

Link copied to clipboard

If animations should be used or not by the renderer.

Link copied to clipboard

Enables support for center spread in pages

Link copied to clipboard

The goTo animation duration when fading in. The default value null will use platform specific duration.

Link copied to clipboard

Ignore the calculated aspectRatio to take up as much of the available view space as possible.

Link copied to clipboard
val insets: RectMargins? = null

Configures insets that can be used to allow the user to scroll content below system UI elements like the notch on mobile devices.

Link copied to clipboard

Minimum margin between spreads in pixels.

Link copied to clipboard

A CSS color to use as default page background.

Link copied to clipboard

A number between 0 and 1 configuring the rubberband effect when trying to swipe before the first page or after the last page. Lower value means stronger rubberband effect.

Link copied to clipboard

Controls the minimum swipe distance required to trigger navigation to the next or previous page. A higher value means the user must swipe farther to turn pages.

Link copied to clipboard

Use full window dimensions when calculating spread container sizes. This option should be true if the ReaderView element allows content to overflow.

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)