PageProgressionTimeline

Describes the contents in the ReaderView as a one-dimensional timeline of all pages.

Positions in the timeline consist of a page index and an offset within that page as a value between 0 and 1. The page index of the first page in the timeline is 0. The timeline length and the page positions can be fixed or estimated depending on the publication and the ReaderViewOptions.pageProgressionTimelineOptions.

You can determine if the page numbers are fixed or estimated using PageProgressionTimeline.timelineType. Please see PageProgressionTimelineType documentation for more information.

You can use ReaderView.addOnPageProgressionTimelineEventListener to react to changes in the timeline.

Functions

Link copied to clipboard
abstract fun fetchLocatorFromPageIndex(pageIndex: Int, onSuccess: (SimpleLocatorData) -> Unit, onError: (ColibrioException) -> Unit)

Fetch a locator from a zero-based pageIndex. The passed pageIndex will be clamped between the timeline start and end.

Link copied to clipboard

Fetch a locator from a timeline position. The passed position will be clamped between the timeline start and end position.

Link copied to clipboard

Fetch a timeline position from a locator.

Properties

Link copied to clipboard

Describes how the timeline was calculated. See PageProgressionTimelineType for more information.

Link copied to clipboard
abstract val totalNumberOfPages: Int

Get the total number of pages for all of the reader documents inside the ReaderView. Check timelineType to determine if this value is estimated or fixed.

Link copied to clipboard

Get a timeline range describing the positions currently visible in the ReaderView. Use timelineType to determine if this range estimated or fixed value.