createFactory

fun <P : Configurable.Preferences<P>> createFactory(publication: Publication, initialLocator: Locator? = null, preferences: P? = null, listener: PdfNavigatorFragment.Listener? = null, pdfEngineProvider: PdfEngineProvider<*, P, *>): FragmentFactory

Creates a factory for PdfNavigatorFragment.

Parameters

publication

PDF publication to render in the navigator.

initialLocator

The first location which should be visible when rendering the publication. Can be used to restore the last reading location.

preferences

Initial set of user preferences.

listener

Optional listener to implement to observe events, such as user taps.

pdfEngineProvider

provider for third-party PDF engine adapter.