Class PdfOutlineView

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource , com.pspdfkit.internal.views.outline.OutlinePagerBaseView.OnHideListener , com.pspdfkit.ui.PSPDFKitViews.PSPDFView , com.pspdfkit.ui.drawable.PdfDrawableManager

    
    public class PdfOutlineView
    extends FrameLayout implements OutlinePagerBaseView.OnHideListener, PSPDFKitViews.PSPDFView, PdfDrawableManager
                        

    A layout containing the tab on the top and a view pager for switching between the outline, the list of annotations and the bookmarks.

    • Method Detail

      • isDisplayed

         boolean isDisplayed()

        Called when the activity needs to know the visibility of this view. Returns true if this view is visible, otherwise returns false.

      • show

         void show()

        Shows the outline view (scroll down animation).

      • clearDocument

         void clearDocument()

        Called by the activity when the view should unbind the previously set document. This may be called in low-memory situations or prior to re-binding another document.

      • setOutlineViewEnabled

         void setOutlineViewEnabled(boolean outlineViewEnabled)

        Enables outline view.

        Parameters:
        outlineViewEnabled - If true, outline view will be shown.
      • setOutlineViewEnabled

         void setOutlineViewEnabled(boolean outlineViewEnabled, boolean refreshViewPager)

        Enables outline view.

        Parameters:
        outlineViewEnabled - If true, outline view will be shown.
        refreshViewPager - If true, the view pager will be refreshed.
      • setDisplayEmbeddedFilesViewEnabled

         void setDisplayEmbeddedFilesViewEnabled(boolean displayEmbeddedFilesView)

        Enables the embedded files view.

        Parameters:
        displayEmbeddedFilesView - If true, embedded files view will be shown.
      • setAnnotationListViewEnabled

         void setAnnotationListViewEnabled(boolean annotationListViewEnabled)

        Enables annotation list view.

        Parameters:
        annotationListViewEnabled - If true, annotation list view will be shown.
      • setAnnotationListViewEnabled

         void setAnnotationListViewEnabled(boolean annotationListViewEnabled, boolean refreshViewPager)

        Enables annotation list view.

        Parameters:
        annotationListViewEnabled - If true, annotation list view will be shown.
        refreshViewPager - If true, the view pager will be refreshed.
      • setAnnotationEditingEnabled

         void setAnnotationEditingEnabled(boolean annotationEditingEnabled)

        Enables additional controls in the annotation outline view to delete annotations.

        Parameters:
        annotationEditingEnabled - If true additional buttons to delete single or all annotations are shown.
      • setBookmarkViewEnabled

         void setBookmarkViewEnabled(boolean bookmarkViewEnabled)

        Enables bookmark view.

        Parameters:
        bookmarkViewEnabled - If true, bookmark list view will be shown.
      • setBookmarkViewEnabled

         void setBookmarkViewEnabled(boolean bookmarkViewEnabled, boolean refreshViewPager)

        Enables bookmark view.

        Parameters:
        bookmarkViewEnabled - If true, bookmark list view will be shown.
        refreshViewPager - If true, the view pager will be refreshed.
      • setDocumentInfoViewEnabled

         void setDocumentInfoViewEnabled(boolean documentInfoViewEnabled)

        Enables document info view.

        Parameters:
        documentInfoViewEnabled - If true, document info view will be shown.
      • setDocumentInfoViewEnabled

         void setDocumentInfoViewEnabled(boolean documentInfoViewEnabled, boolean refreshViewPager)

        Enables document info view.

        Parameters:
        documentInfoViewEnabled - If true, document info view will be shown.
        refreshViewPager - If true, the view pager will be refreshed.
      • setBookmarkEditingEnabled

         void setBookmarkEditingEnabled(boolean bookmarkEditingEnabled)

        Allows bookmark view to edit annotations.

        Parameters:
        bookmarkEditingEnabled - If true, bookmarks can be edited.
      • setBookmarkRenamingEnabled

         void setBookmarkRenamingEnabled(boolean bookmarkRenamingEnabled)

        Allows bookmark view to rename annotations.

        Parameters:
        bookmarkRenamingEnabled - If true, bookmarks can be renamed.
      • setBookmarkAdapter

         void setBookmarkAdapter(@Nullable() BookmarkViewAdapter adapter)

        Sets an adapter that handles actual bookmark data.

        Parameters:
        adapter - Adapter that providers bookmark view with data and handles data changes.
      • setShowPageLabels

         void setShowPageLabels(boolean showPageLabels)

        Provide API for controlling content of the PdfOutlineView. Set should the outline view show page labels. If disabled, only page numbers are shown.

        Parameters:
        showPageLabels - If true, page labels will be displayed in outline (if any).
      • setListedAnnotationTypes

         void setListedAnnotationTypes(@NonNull() EnumSet<AnnotationType> listedAnnotationTypes)

        Sets annotation types to be listed (if the annotation list is enabled).

        Parameters:
        listedAnnotationTypes - List of annotation types to be displayed in the annotation list.
      • setAnnotationListReorderingEnabled

         void setAnnotationListReorderingEnabled(boolean enable)

        Sets whether reordering of annotations in the annotation list is enabled. This defaults to true.

        Parameters:
        enable - true to enable reordering annotations in the annotation list.
      • hide

         void hide()

        Hides the outline view (scroll up animation).

      • refreshViewPager

        @UiThread() void refreshViewPager()

        Refreshes the view pager adapter and binds it to the pager tabs. This has to be called on the main thread.