PdfNavigatorFragment

Navigator for PDF publications.

The PDF navigator delegates the actual PDF rendering to third-party engines like PDFium or PSPDFKit.

To use this Fragment, create a factory with PdfNavigatorFactory.createFragmentFactory.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard
val activity: @Nullable FragmentActivity?
Link copied to clipboard
var arguments: @Nullable Bundle?
Link copied to clipboard
Link copied to clipboard
open val context: @Nullable Context?
Link copied to clipboard
open override val currentLocator: StateFlow<Locator>

Current position in the publication. Can be used to save a bookmark to the current position.

Link copied to clipboard
open var enterTransition: @Nullable Any?
Link copied to clipboard
open var exitTransition: @Nullable Any?
Link copied to clipboard
Link copied to clipboard
val host: @Nullable Any?
Link copied to clipboard
val id: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val lifecycle: @NonNull Lifecycle
Link copied to clipboard
open val loaderManager: @NonNull LoaderManager
Link copied to clipboard
Link copied to clipboard
open override val overflow: StateFlow<OverflowableNavigator.Overflow>

Current presentation rendered by the navigator.

Link copied to clipboard
val parentFragment: @Nullable Fragment?
Link copied to clipboard
Link copied to clipboard
open override val publicationView: View

View displaying the publication.

Link copied to clipboard
open var reenterTransition: @Nullable Any?
Link copied to clipboard
val resources: @NonNull Resources
Link copied to clipboard
Link copied to clipboard
open var returnTransition: @Nullable Any?
Link copied to clipboard
Link copied to clipboard
open override val settings: StateFlow<S>

Current Settings values.

Link copied to clipboard
open var sharedElementEnterTransition: @Nullable Any?
Link copied to clipboard
open var sharedElementReturnTransition: @Nullable Any?
Link copied to clipboard
val tag: @Nullable String?
Link copied to clipboard
val targetFragment: @Nullable Fragment?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val view: @Nullable View?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val viewModelStore: @NonNull ViewModelStore

Functions

Link copied to clipboard
open override fun addInputListener(listener: InputListener)

Adds a new InputListener to receive touch, mouse or keyboard events.

Link copied to clipboard
Link copied to clipboard
open fun dump(prefix: @NonNull String, fd: @Nullable FileDescriptor?, writer: @NonNull PrintWriter, args: @Nullable Array<out String?>??)
Link copied to clipboard
open suspend fun firstVisibleElementLocator(): Locator?

Returns the Locator to the first content element that begins on the current screen.

Link copied to clipboard
fun getString(@StringRes resId: Int): @NonNull String
fun getString(@StringRes resId: Int, vararg formatArgs: Any?): @NonNull String
Link copied to clipboard
fun getText(@StringRes resId: Int): @NonNull CharSequence
Link copied to clipboard
open override fun go(link: Link, animated: Boolean = false): Boolean

Moves to the position in the publication targeted by the given link.

open override fun go(locator: Locator, animated: Boolean = false): Boolean

Moves to the position in the publication corresponding to the given Locator.

Link copied to clipboard
open override fun goBackward(animated: Boolean = false): Boolean

Moves to the previous content portion (eg. page) in the reading progression direction.

Link copied to clipboard
open override fun goForward(animated: Boolean = false): Boolean

Moves to the next content portion (eg. page) in the reading progression direction.

Link copied to clipboard
open fun onActivityCreated(savedInstanceState: @Nullable Bundle?)
Link copied to clipboard
open fun onActivityResult(requestCode: Int, resultCode: Int, data: @Nullable Intent?)
Link copied to clipboard
open fun onAttach(activity: @NonNull Activity)
open fun onAttach(context: @NonNull Context)
Link copied to clipboard
open fun onAttachFragment(childFragment: @NonNull Fragment)
Link copied to clipboard
open fun onConfigurationChanged(newConfig: @NonNull Configuration)
Link copied to clipboard
Link copied to clipboard
open override fun onCreate(savedInstanceState: Bundle?)
Link copied to clipboard
open fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): @Nullable Animation?
Link copied to clipboard
open fun onCreateAnimator(transit: Int, enter: Boolean, nextAnim: Int): @Nullable Animator?
Link copied to clipboard
open fun onCreateContextMenu(menu: @NonNull ContextMenu, v: @NonNull View, menuInfo: @Nullable ContextMenu.ContextMenuInfo?)
Link copied to clipboard
open fun onCreateOptionsMenu(menu: @NonNull Menu, inflater: @NonNull MenuInflater)
Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onGetLayoutInflater(savedInstanceState: @Nullable Bundle?): @NonNull LayoutInflater
Link copied to clipboard
Link copied to clipboard
open fun onInflate(activity: @NonNull Activity, attrs: @NonNull AttributeSet, savedInstanceState: @Nullable Bundle?)
open fun onInflate(context: @NonNull Context, attrs: @NonNull AttributeSet, savedInstanceState: @Nullable Bundle?)
Link copied to clipboard
Link copied to clipboard
open fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun onOptionsMenuClosed(menu: @NonNull Menu)
Link copied to clipboard
Link copied to clipboard
open fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)
Link copied to clipboard
open fun onPrepareOptionsMenu(menu: @NonNull Menu)
Link copied to clipboard
open fun onPrimaryNavigationFragmentChanged(isPrimaryNavigationFragment: Boolean)
Link copied to clipboard
open fun onRequestPermissionsResult(requestCode: Int, permissions: @NonNull Array<out String?>, grantResults: @NonNull IntArray)
Link copied to clipboard
open override fun onResume()
Link copied to clipboard
open fun onSaveInstanceState(outState: @NonNull Bundle)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)
Link copied to clipboard
open fun onViewStateRestored(savedInstanceState: @Nullable Bundle?)
Link copied to clipboard
open fun peekAvailableContext(): @Nullable Context?
Link copied to clipboard
fun postponeEnterTransition(duration: Long, timeUnit: @NonNull TimeUnit)
Link copied to clipboard
fun <I : Any?, O : Any?> registerForActivityResult(contract: @NonNull ActivityResultContract<I, O>, callback: @NonNull ActivityResultCallback<O>): @NonNull ActivityResultLauncher<I?>
fun <I : Any?, O : Any?> registerForActivityResult(contract: @NonNull ActivityResultContract<I, O>, registry: @NonNull ActivityResultRegistry, callback: @NonNull ActivityResultCallback<O>): @NonNull ActivityResultLauncher<I?>
Link copied to clipboard
open fun registerForContextMenu(view: @NonNull View)
Link copied to clipboard
open override fun removeInputListener(listener: InputListener)

Removes a previously registered InputListener.

Link copied to clipboard
fun requestPermissions(permissions: @NonNull Array<out String?>, requestCode: Int)
Link copied to clipboard
Link copied to clipboard
fun requireArguments(): @NonNull Bundle
Link copied to clipboard
fun requireContext(): @NonNull Context
Link copied to clipboard
Link copied to clipboard
fun requireHost(): @NonNull Any
Link copied to clipboard
Link copied to clipboard
fun requireView(): @NonNull View
Link copied to clipboard
Link copied to clipboard
open fun setExitSharedElementCallback(callback: @Nullable SharedElementCallback?)
Link copied to clipboard
open fun setHasOptionsMenu(hasMenu: Boolean)
Link copied to clipboard
open fun setInitialSavedState(state: @Nullable Fragment.SavedState?)
Link copied to clipboard
open fun setMenuVisibility(menuVisible: Boolean)
Link copied to clipboard
open fun setTargetFragment(fragment: @Nullable Fragment?, requestCode: Int)
Link copied to clipboard
open fun shouldShowRequestPermissionRationale(permission: @NonNull String): Boolean
Link copied to clipboard
open fun startActivity(intent: @NonNull Intent)
open fun startActivity(intent: @NonNull Intent, options: @Nullable Bundle?)
Link copied to clipboard
open fun startActivityForResult(intent: @NonNull Intent, requestCode: Int)
open fun startActivityForResult(intent: @NonNull Intent, requestCode: Int, options: @Nullable Bundle?)
Link copied to clipboard
open fun startIntentSenderForResult(intent: @NonNull IntentSender, requestCode: Int, fillInIntent: @Nullable Intent?, flagsMask: Int, flagsValues: Int, extraFlags: Int, options: @Nullable Bundle?)
Link copied to clipboard
Link copied to clipboard
open override fun submitPreferences(preferences: P)

Submits a new set of Preferences to update the current Settings.

Link copied to clipboard
open fun unregisterForContextMenu(view: @NonNull View)