Outline dialog fragment

In this document
chevron_rightShow outline dialog
chevron_rightListener

Outline or PDF bookmarks like a table of contents demonstrates how the PDF document is organized and help users see the overall picture. The OutlineDialogFragment dialog class shows document outline (PDF Bookmark) that can be used to navigate through the document being viewed by a PDFViewCtrl by tapping on a bookmark item.

Show outline dialog

To create a new instance of the outline dialog fragment call newInstance() and set the PDFViewCtrl:

OutlineDialogFragment outlineDialogFragment = OutlineDialogFragment.newInstance()
    .setPdfViewCtrl(pdfViewCtrl);
outlineDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.CustomAppTheme);
outlineDialogFragment.show(fragmentManager, "outline_dialog");

You can also set the current bookmark using setCurrentBookmark(Bookmark).

Listener

You can set a listener via setOutlineDialogListener(OutlineDialogListener) to be notified when an item in outline is clicked.