public class

PdfOutlineView

extends FrameLayout
implements OutlinePagerBaseView.OnHideListener PSPDFKitViews.PSPDFView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.pspdfkit.ui.PdfOutlineView

Class Overview

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

Summary

Nested Classes
interface PdfOutlineView.OnAnnotationTapListener Annotation list tap listener. 
interface PdfOutlineView.OnOutlineElementTapListener Outline element tap listener. 
class PdfOutlineView.OutlinePagerAdapter A state pager adapter controlling the pager items (outline view and annotation list view) that saves and restores View states. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
PdfOutlineView(Context context)
PdfOutlineView(Context context, AttributeSet attrs)
PdfOutlineView(Context context, AttributeSet attrs, int defStyleAttr)
PdfOutlineView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void addOnDocumentInfoViewModeChangeListener(OnDocumentInfoViewModeChangeListener listener)
Adds the listener for the editing mode changes on this document info view.
void addOnDocumentInfoViewSaveListener(OnDocumentInfoViewSaveListener listener)
Adds the listener for saving the document info changes.
void addOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Register a listener that would like to receive visibility change events.
void clearDocument()
Called by the activity when the view should unbind the previously set document.
PSPDFKitViews.Type getPSPDFViewType()
Returns the type of this view.
void hide()
Hides the outline view (scroll up animation).
boolean isDisplayed()
Called when the activity needs to know the visibility of this view.
boolean onTouchEvent(MotionEvent event)
void removeOnDocumentInfoViewModeChangeListener(OnDocumentInfoViewModeChangeListener listener)
Removes the listener for the editing mode changes on this document info view.
void removeOnDocumentInfoViewSaveListener(OnDocumentInfoViewSaveListener listener)
Removes the listener for saving the document info changes.
void removeOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Unregister a previously registered listener that no longer wants to receive visibility change events.
void setAnnotationListViewEnabled(boolean annotationListViewEnabled)
Set if annotation list view is enabled.
void setBookmarkAdapter(BookmarkViewAdapter adapter)
Sets an adapter that handles actual bookmark data.
void setBookmarkEditingEnabled(boolean bookmarkEditingEnabled)
Set if bookmark view allows editing of annotations.
void setBookmarkRenamingEnabled(boolean bookmarkRenamingEnabled)
Sets if bookmark view allows renaming of annotations.
void setBookmarkViewEnabled(boolean bookmarkViewEnabled)
Set if bookmark view is enabled.
void setDocument(PdfDocument document, PdfConfiguration configuration)
Called when the document has been loaded and is going to be displayed.
void setDocumentInfoViewEnabled(boolean documentInfoViewEnabled)
Set if document info view is enabled.
void setListedAnnotationTypes(EnumSet<AnnotationType> listedAnnotationTypes)
Set annotation types to be listed (if the annotation list is enabled).
void setOnAnnotationTapListener(PdfOutlineView.OnAnnotationTapListener onAnnotationTapListener)
Set a listener to be notified of annotation tap events.
void setOnOutlineElementTapListener(PdfOutlineView.OnOutlineElementTapListener onOutlineElementTapListener)
Set a listener to be notified of outline tap events.
void setOutlineViewEnabled(boolean outlineViewEnabled)
Set if outline view is enabled.
void setShowPageLabels(boolean showPageLabels)
Provide API for controlling content of the PdfOutlineView.
void show()
Shows the outline view (scroll down animation).
Protected Methods
boolean fitSystemWindows(Rect insets)
void onDraw(Canvas canvas)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pspdfkit.framework.views.outline.OutlinePagerBaseView.OnHideListener
From interface com.pspdfkit.ui.PSPDFKitViews.PSPDFView

Public Constructors

public PdfOutlineView (Context context)

public PdfOutlineView (Context context, AttributeSet attrs)

public PdfOutlineView (Context context, AttributeSet attrs, int defStyleAttr)

public PdfOutlineView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void addOnDocumentInfoViewModeChangeListener (OnDocumentInfoViewModeChangeListener listener)

Adds the listener for the editing mode changes on this document info view.

Parameters
listener Listener for mode changes to be added.

public void addOnDocumentInfoViewSaveListener (OnDocumentInfoViewSaveListener listener)

Adds the listener for saving the document info changes.

Parameters
listener Listener to be added.

public void addOnVisibilityChangedListener (OnVisibilityChangedListener listener)

Register a listener that would like to receive visibility change events. Whenever the visibility of a managed PSPDFKitViews.PSPDFView changes, all registered listeners will be notified.

Parameters
listener Listener to be added.

public 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.

public PSPDFKitViews.Type getPSPDFViewType ()

Returns the type of this view.

Returns

public void hide ()

Hides the outline view (scroll up animation).

public boolean isDisplayed ()

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

public boolean onTouchEvent (MotionEvent event)

public void removeOnDocumentInfoViewModeChangeListener (OnDocumentInfoViewModeChangeListener listener)

Removes the listener for the editing mode changes on this document info view.

Parameters
listener Listener for mode changes to be removed.

public void removeOnDocumentInfoViewSaveListener (OnDocumentInfoViewSaveListener listener)

Removes the listener for saving the document info changes.

Parameters
listener Listener to be removed.

public void removeOnVisibilityChangedListener (OnVisibilityChangedListener listener)

Unregister a previously registered listener that no longer wants to receive visibility change events.

Parameters
listener Listener to be removed.

public void setAnnotationListViewEnabled (boolean annotationListViewEnabled)

Set if annotation list view is enabled.

Parameters
annotationListViewEnabled If true, annotation list view will be shown.

public void setBookmarkAdapter (BookmarkViewAdapter adapter)

Sets an adapter that handles actual bookmark data.

Parameters
adapter Adapter that providers bookmark view with data and handles data changes.

public void setBookmarkEditingEnabled (boolean bookmarkEditingEnabled)

Set if bookmark view allows editing of annotations.

Parameters
bookmarkEditingEnabled If true, bookmarks can be edited.

public void setBookmarkRenamingEnabled (boolean bookmarkRenamingEnabled)

Sets if bookmark view allows renaming of annotations.

Parameters
bookmarkRenamingEnabled If true, bookmarks can be renamed.

public void setBookmarkViewEnabled (boolean bookmarkViewEnabled)

Set if bookmark view is enabled.

Parameters
bookmarkViewEnabled If true, bookmark list view will be shown.

public void setDocument (PdfDocument document, PdfConfiguration configuration)

Called when the document has been loaded and is going to be displayed.

Parameters
document Loaded PdfDocument.
configuration Containing document and presentation settings.

public void setDocumentInfoViewEnabled (boolean documentInfoViewEnabled)

Set if document info view is enabled.

Parameters
documentInfoViewEnabled If true, document info view will be shown.

public void setListedAnnotationTypes (EnumSet<AnnotationType> listedAnnotationTypes)

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

Parameters
listedAnnotationTypes List of annotation types to be displayed in the annotation list.

public void setOnAnnotationTapListener (PdfOutlineView.OnAnnotationTapListener onAnnotationTapListener)

Set a listener to be notified of annotation tap events. Calling this method will replace any previously set listener. You may provide null to clear the listener.

Parameters
onAnnotationTapListener PdfOutlineView.OnAnnotationTapListener that should be notified, or null to clear the listener.

public void setOnOutlineElementTapListener (PdfOutlineView.OnOutlineElementTapListener onOutlineElementTapListener)

Set a listener to be notified of outline tap events. Calling this method will replace any previously set listener. You may provide null to clear the listener.

Parameters
onOutlineElementTapListener PdfOutlineView.OnOutlineElementTapListener that should be notified, or null to clear the listener.

public void setOutlineViewEnabled (boolean outlineViewEnabled)

Set if outline view is enabled.

Parameters
outlineViewEnabled If true, outline view will be shown.

public 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).

public void show ()

Shows the outline view (scroll down animation).

Protected Methods

protected boolean fitSystemWindows (Rect insets)

protected void onDraw (Canvas canvas)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)