java.lang.Object
   ↳ Fragment
     ↳ com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment
       ↳ com.pdftron.pdf.controls.PdfViewCtrlTabFragment
Known Direct Subclasses

This class is deprecated.
use PdfViewCtrlTabFragment2 instead

The PdfViewCtrlTabFragment shows PDFViewCtrl out of the box with a various of controls such as AnnotationToolbar, ThumbnailSlider, ThumbnailsViewFragment etc.

Summary

Nested Classes
interface PdfViewCtrlTabFragment.TabListener Callback interface to be invoked when an interaction is needed. 
[Expand]
Inherited Constants
From class com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment
Public Constructors
PdfViewCtrlTabFragment()
Public Methods
void addAnnotationToolbarListener(AnnotationToolbar.AnnotationToolbarListener listener)
void createAnnotationToolbar()
AnnotationToolbar getAnnotationToolbar()
Returns AnnotationToolbar associated with this tab.
boolean handleKeyShortcut(int keyCode, KeyEvent event)
Handles CTRL-based key when triggered.
boolean handleKeyUp(int keyCode, KeyEvent event)
Handles key when pressed up.
void hideAnnotationToolbar()
Hides the annotation toolbar.
boolean isAnnotationMode()
Checks if the tab is in annotation mode.
boolean isRtlMode()
Checks whether right-to-left mode is enabled
boolean isThumbSliderVisible()
void onConfigurationChanged(Configuration newConfig)
The overloaded implementation of Fragment#onConfigurationChanged(Configuration).
void onDocumentLoaded()
Handles terminating document load.
boolean onHideToolbars()
Called when the androidx.appcompat.widget.Toolbar toolbar of the containing host fragment will be hidden.
void onPageChange(int old_page, int cur_page, PDFViewCtrl.PageChangeState state)
Handles changes the page number.
void onSaveInstanceState(Bundle outState)
void onThumbSliderStartTrackingTouch()
The overloaded implementation of onThumbSliderStartTrackingTouch().
void onThumbSliderStopTrackingTouch(int pageNum)
The overloaded implementation of onThumbSliderStopTrackingTouch(int).
void onThumbnailsViewDialogDismiss(int pageNum, boolean docPagesModified)
Handles when thumbnails view dialog is dismissed.
void onUndoRedoCalled()
Handles when undo/redo operation is done.
void removeAnnotationToolbarListener(AnnotationToolbar.AnnotationToolbarListener listener)
void setTabListener(PdfViewCtrlTabFragment.TabListener listener)
void setThumbSliderVisible(boolean visible, boolean animateThumbSlider)
Sets the visibility of thumbnail slider.
void setViewerTopMargin(int height)
void setVisibilityOfImaginedToolbar(boolean visible)
void showAnnotationToolbar(int mode, Annot inkAnnot, int pageNum, ToolManager.ToolMode toolMode, boolean dismissAfterUse)
Shows the annotation toolbar.
void toolChanged(ToolManager.Tool newTool, ToolManager.Tool oldTool)
Event called when the tool changes.
void userCropDialogDismiss()
Dismisses the user crop dialog.
[Expand]
Inherited Methods
From class com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment
From class java.lang.Object
From interface com.pdftron.pdf.PDFViewCtrl.DocumentDownloadListener
From interface com.pdftron.pdf.PDFViewCtrl.DocumentLoadListener
From interface com.pdftron.pdf.PDFViewCtrl.PageChangeListener
From interface com.pdftron.pdf.PDFViewCtrl.RenderingListener
From interface com.pdftron.pdf.PDFViewCtrl.UniversalDocumentConversionListener
From interface com.pdftron.pdf.PDFViewCtrl.UniversalDocumentProgressIndicatorListener
From interface com.pdftron.pdf.controls.ReflowControl.OnReflowTapListener
From interface com.pdftron.pdf.controls.ThumbnailSlider.OnThumbnailSliderTrackingListener
From interface com.pdftron.pdf.controls.UndoRedoPopupWindow.OnUndoRedoListener
From interface com.pdftron.pdf.dialog.PortfolioDialogFragment.PortfolioDialogFragmentListener
From interface com.pdftron.pdf.tools.ToolManager.ActionGoBackListener
From interface com.pdftron.pdf.tools.ToolManager.AdvancedAnnotationListener
From interface com.pdftron.pdf.tools.ToolManager.AnnotationModificationListener
From interface com.pdftron.pdf.tools.ToolManager.BasicAnnotationListener
From interface com.pdftron.pdf.tools.ToolManager.FileAttachmentAnnotationListener
From interface com.pdftron.pdf.tools.ToolManager.FullSaveListener
From interface com.pdftron.pdf.tools.ToolManager.OnGenericMotionEventListener
From interface com.pdftron.pdf.tools.ToolManager.PdfDocModificationListener
From interface com.pdftron.pdf.tools.ToolManager.PdfTextModificationListener
From interface com.pdftron.pdf.tools.ToolManager.PreToolManagerListener
From interface com.pdftron.pdf.tools.ToolManager.QuickMenuListener
From interface com.pdftron.pdf.tools.ToolManager.ToolChangedListener

Public Constructors

public PdfViewCtrlTabFragment ()

Public Methods

public void addAnnotationToolbarListener (AnnotationToolbar.AnnotationToolbarListener listener)

Parameters
listener The listener

public void createAnnotationToolbar ()

public AnnotationToolbar getAnnotationToolbar ()

Returns AnnotationToolbar associated with this tab.

Returns
  • The AnnotationToolbar

public boolean handleKeyShortcut (int keyCode, KeyEvent event)

Handles CTRL-based key when triggered.

Parameters
keyCode The key code
event The key event
Returns
  • True if the key is handled

public boolean handleKeyUp (int keyCode, KeyEvent event)

Handles key when pressed up.

Parameters
keyCode The key code
event The key event
Returns
  • True if the key is handled

public void hideAnnotationToolbar ()

Hides the annotation toolbar.

public boolean isAnnotationMode ()

Checks if the tab is in annotation mode.

Returns
  • True if the tab is in annotation mode.

public boolean isRtlMode ()

Checks whether right-to-left mode is enabled

Returns
  • True if right-to-left mode is enabled.

public boolean isThumbSliderVisible ()

public void onConfigurationChanged (Configuration newConfig)

The overloaded implementation of Fragment#onConfigurationChanged(Configuration).

public void onDocumentLoaded ()

Handles terminating document load.

public boolean onHideToolbars ()

Called when the androidx.appcompat.widget.Toolbar toolbar of the containing host fragment will be hidden.

Returns
  • true if the toolbar can be hidden, false otherwise.

public void onPageChange (int old_page, int cur_page, PDFViewCtrl.PageChangeState state)

Handles changes the page number.

Parameters
old_page the old page number
cur_page the current (new) page number
state in non-continuous page presentation modes and when the built-in page sliding is in process, this flag is used to indicate the state of page change.

public void onSaveInstanceState (Bundle outState)

public void onThumbSliderStartTrackingTouch ()

The overloaded implementation of onThumbSliderStartTrackingTouch().

public void onThumbSliderStopTrackingTouch (int pageNum)

The overloaded implementation of onThumbSliderStopTrackingTouch(int).

Parameters
pageNum The current page number on thumbnail slider

public void onThumbnailsViewDialogDismiss (int pageNum, boolean docPagesModified)

Handles when thumbnails view dialog is dismissed.

Parameters
pageNum The selected page number
docPagesModified True if the document pages are modified.

public void onUndoRedoCalled ()

Handles when undo/redo operation is done.

public void removeAnnotationToolbarListener (AnnotationToolbar.AnnotationToolbarListener listener)

public void setTabListener (PdfViewCtrlTabFragment.TabListener listener)

Parameters
listener The listener

public void setThumbSliderVisible (boolean visible, boolean animateThumbSlider)

Sets the visibility of thumbnail slider.

Parameters
visible True if the thumbnail slider should be visible
animateThumbSlider True if the visibility should be changed with animation

public void setViewerTopMargin (int height)

public void setVisibilityOfImaginedToolbar (boolean visible)

public void showAnnotationToolbar (int mode, Annot inkAnnot, int pageNum, ToolManager.ToolMode toolMode, boolean dismissAfterUse)

Shows the annotation toolbar.

Parameters
mode The mode that annotation toolbar should start with. Possible values are START_MODE_NORMAL_TOOLBAR, START_MODE_EDIT_TOOLBAR, START_MODE_FORM_TOOLBAR
inkAnnot The ink annotation
pageNum The page number
toolMode The tool mode annotation toolbar should start with
dismissAfterUse Whether should dismiss after use

public void toolChanged (ToolManager.Tool newTool, ToolManager.Tool oldTool)

Event called when the tool changes.

Parameters
newTool the new tool
oldTool the old tool

public void userCropDialogDismiss ()

Dismisses the user crop dialog.