public class

PdfViewCtrlTabHostFragment2

extends PdfViewCtrlTabHostBaseFragment
implements PdfViewCtrlTabFragment2.TabListener
java.lang.Object
   ↳ Fragment
     ↳ com.pdftron.pdf.controls.PdfViewCtrlTabHostBaseFragment
       ↳ com.pdftron.pdf.controls.PdfViewCtrlTabHostFragment2
Known Direct Subclasses

Class Overview

The PdfViewCtrlTabHostFragment2 shows multiple PdfViewCtrlTabFragment2 in tab layout.

Summary

Nested Classes
interface PdfViewCtrlTabHostFragment2.AppBarVisibilityListener Callback interface to be invoked when AppBar visibility changes. 
interface PdfViewCtrlTabHostFragment2.OnPreBuildToolbarListener Listener called prior to building a new AnnotationToolbar. 
interface PdfViewCtrlTabHostFragment2.OnToolbarChangedListener Listener called when toolbar changes. 
interface PdfViewCtrlTabHostFragment2.ReflowControlListener  
interface PdfViewCtrlTabHostFragment2.TabHostListener Callback interface to be invoked when an interaction is needed. 
[Expand]
Inherited Constants
From class com.pdftron.pdf.controls.PdfViewCtrlTabHostBaseFragment
Public Constructors
PdfViewCtrlTabHostFragment2()
Public Methods
void addOnPreBuildToolbarListener(PdfViewCtrlTabHostFragment2.OnPreBuildToolbarListener listener)
Add listener to notify prior to building a new AnnotationToolbar.
void addOnToolbarChangedListener(PdfViewCtrlTabHostFragment2.OnToolbarChangedListener listener)
Add listener to notify when the toolbar changes.
void exitSearchMode()
Exits the search mode.
PdfViewCtrlTabFragment2 getCurrentPdfViewCtrlFragment()
Returns the selected PdfViewCtrlTabBaseFragment.
String getCurrentToolbarTag()
Gets the current active toolbar tag
void handleToolSwitcherClicked(View v)
Shows toolbar switcher when appropriate
void hideToolbarWithTag(String toolbarTag)
Hides the toolbar with given toolbar tag.
void hideUI()
Hides the UI.
static PdfViewCtrlTabHostFragment2 newInstance(Bundle args)
Returns a new instance of the class
void onBookmarksDialogDismissed(int tabIndex)
The overloaded implementation of onBookmarksDialogDismissed(int).
void onConfigurationChanged(Configuration newConfig)
void onCreate(Bundle savedInstanceState)
void onEditToolbarMenu()
void onInkEditSelected(Annot inkAnnot, int pageNum)
The overload implementation of onInkEditSelected(Annot, int).
void onOpenAnnotationToolbar(ToolManager.ToolMode mode)
The overload implementation of onOpenAnnotationToolbar(ToolMode).
void onOpenEditToolbar(ToolManager.ToolMode mode)
The overload implementation of onOpenEditToolbar(ToolMode).
void onOpenTabSwitcher()
boolean onOptionsItemSelected(MenuItem item)
void onSearchOptionSelected()
void onSystemUiVisibilityChange(int visibility)
void onTabDocumentLoaded(String tag)
The overload implementation of onTabDocumentLoaded(String).
void onTabReselected(TabLayout.Tab tab)
void onTabSingleTapConfirmed()
The overload implementation of onTabSingleTapConfirmed().
void onToggleReflow()
The overload implementation of onToggleReflow().
void openToolbarWithTag(String toolbarTag)
Switch to the toolbar with the given Toolbar tag.
void removeOnPreBuildToolbarListener(PdfViewCtrlTabHostFragment2.OnPreBuildToolbarListener listener)
void removeOnToolbarChangedListener(PdfViewCtrlTabHostFragment2.OnToolbarChangedListener listener)
void removeTab(String filepath, String nextTabTagToSelect)
Removes the specified tab.
void selectToolbarButton(DefaultToolbars.ButtonId defaultToolbarId)
Selects the tool in the toolbar, if available.
void selectToolbarButton(int buttonId)
Selects the tool in the current toolbar, if available.
void setAnnotationToolbarVisible(boolean visible, boolean animated)
Sets the visibility of the annotation toolbar, and animates visibility change if specified.
void setAnnotationToolbars(List<AnnotationToolbarBuilder> toolbarBuilders)
Sets the toolbars of the current viewer.
void setToolbarSwitcherVisible(boolean visible)
Sets the toolbar switcher button visibility to View.VISIBLE or View.GONE.
void setToolbarsVisible(boolean visible, boolean animateBottomBar)
Handles changing the visibility of toolbars.
void setViewerOverlayUIVisible(boolean visible)
The implementation should change the visibility of top toolbar, bottom navigation bar as well as system navigation bar.
void showToolbarWithTag(String toolbarTag)
Show the toolbar with given toolbar tag.
void showUI()
Shows the UI.
void startSearchMode()
Starts the search mode.
void toolbarButtonVisibility(ToolbarButtonType buttonType, boolean visibility)
Set visibility of annotation toolbar button
void updateToolbarState()
Updates the toolbar state depending on ToolManager state.
[Expand]
Inherited Methods
From class com.pdftron.pdf.controls.PdfViewCtrlTabHostBaseFragment
From class java.lang.Object
From interface android.view.View.OnLayoutChangeListener
From interface android.view.View.OnSystemUiVisibilityChangeListener
From interface com.pdftron.pdf.controls.BookmarksTabLayout.BookmarksTabsListener
From interface com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment.TabListener
From interface com.pdftron.pdf.controls.SearchResultsView.SearchResultsListener
From interface com.pdftron.pdf.controls.ThumbnailsViewFragment.OnExportThumbnailsListener
From interface com.pdftron.pdf.controls.ThumbnailsViewFragment.OnThumbnailsEditAttemptWhileReadOnlyListener
From interface com.pdftron.pdf.controls.ThumbnailsViewFragment.OnThumbnailsViewDialogDismissListener
From interface com.pdftron.pdf.controls.UserCropDialogFragment.OnUserCropDialogDismissListener
From interface com.pdftron.pdf.controls.UserCropSelectionDialogFragment.UserCropSelectionDialogFragmentListener
From interface com.pdftron.pdf.dialog.BookmarksDialogFragment.BookmarksDialogListener
From interface com.pdftron.pdf.dialog.ViewModePickerDialogFragment.ViewModePickerDialogFragmentListener
From interface com.pdftron.pdf.tools.ToolManager.QuickMenuListener
From interface com.pdftron.pdf.utils.UserCropUtilities.AutoCropInBackgroundTask.AutoCropTaskListener

Public Constructors

public PdfViewCtrlTabHostFragment2 ()

Public Methods

public void addOnPreBuildToolbarListener (PdfViewCtrlTabHostFragment2.OnPreBuildToolbarListener listener)

Add listener to notify prior to building a new AnnotationToolbar.

Parameters
listener to add

public void addOnToolbarChangedListener (PdfViewCtrlTabHostFragment2.OnToolbarChangedListener listener)

Add listener to notify when the toolbar changes.

Parameters
listener to add

public void exitSearchMode ()

Exits the search mode.

public PdfViewCtrlTabFragment2 getCurrentPdfViewCtrlFragment ()

Returns the selected PdfViewCtrlTabBaseFragment.

Returns
  • The PdfViewCtrlTabBaseFragment

public String getCurrentToolbarTag ()

Gets the current active toolbar tag

Returns
  • the toolbar tag

public void handleToolSwitcherClicked (View v)

Shows toolbar switcher when appropriate

Parameters
v the anchor view

public void hideToolbarWithTag (String toolbarTag)

Hides the toolbar with given toolbar tag. Must only be called after onCreate.

Parameters
toolbarTag the toolbar tag defined by the toolbar to hide

public void hideUI ()

Hides the UI.

public static PdfViewCtrlTabHostFragment2 newInstance (Bundle args)

Returns a new instance of the class

public void onBookmarksDialogDismissed (int tabIndex)

The overloaded implementation of onBookmarksDialogDismissed(int).

Parameters
tabIndex The index of selected tab when dismissed

public void onConfigurationChanged (Configuration newConfig)

public void onCreate (Bundle savedInstanceState)

public void onEditToolbarMenu ()

public void onInkEditSelected (Annot inkAnnot, int pageNum)

The overload implementation of onInkEditSelected(Annot, int).

Parameters
inkAnnot The annotation
pageNum The page number

public void onOpenAnnotationToolbar (ToolManager.ToolMode mode)

The overload implementation of onOpenAnnotationToolbar(ToolMode).

Parameters
mode The tool mode

public void onOpenEditToolbar (ToolManager.ToolMode mode)

The overload implementation of onOpenEditToolbar(ToolMode).

Parameters
mode The tool mode

public void onOpenTabSwitcher ()

public boolean onOptionsItemSelected (MenuItem item)

public void onSearchOptionSelected ()

public void onSystemUiVisibilityChange (int visibility)

public void onTabDocumentLoaded (String tag)

The overload implementation of onTabDocumentLoaded(String).

Parameters
tag The tab tab

public void onTabReselected (TabLayout.Tab tab)

public void onTabSingleTapConfirmed ()

The overload implementation of onTabSingleTapConfirmed().

public void onToggleReflow ()

The overload implementation of onToggleReflow().

public void openToolbarWithTag (String toolbarTag)

Switch to the toolbar with the given Toolbar tag. Must only be called after onCreate.

Parameters
toolbarTag the toolbar tag defined by the toolbar to open

public void removeOnPreBuildToolbarListener (PdfViewCtrlTabHostFragment2.OnPreBuildToolbarListener listener)

Parameters
listener to remove

public void removeOnToolbarChangedListener (PdfViewCtrlTabHostFragment2.OnToolbarChangedListener listener)

Parameters
listener to remove

public void removeTab (String filepath, String nextTabTagToSelect)

Removes the specified tab.

Parameters
filepath The file path
nextTabTagToSelect The tab tag of the tab that should be selected thereafter

public void selectToolbarButton (DefaultToolbars.ButtonId defaultToolbarId)

Selects the tool in the toolbar, if available. Must only be called after onViewCreated.

Parameters
defaultToolbarId the id used in the default toolbar

public void selectToolbarButton (int buttonId)

Selects the tool in the current toolbar, if available. Must only be called after onViewCreated. Passing in -1 will clear the toolbar state and select pan tool.

Parameters
buttonId of the toolbar button

public void setAnnotationToolbarVisible (boolean visible, boolean animated)

Sets the visibility of the annotation toolbar, and animates visibility change if specified.

Must only be called after onViewCreated

Parameters
visible whether the annotation toolbar should be visible
animated whether changing the visibility should be animated

public void setAnnotationToolbars (List<AnnotationToolbarBuilder> toolbarBuilders)

Sets the toolbars of the current viewer. If the given toolbars are empty, the the annotation toolbar and toolbar switcher button will automatically hide. If the given toolbars are non-empty, then the annotation toolbar and toolbar switcher button will automatically show. The first toolbar will be selected after setting the toolbars

Parameters
toolbarBuilders the toolbars to set to the viewer.

public void setToolbarSwitcherVisible (boolean visible)

Sets the toolbar switcher button visibility to View.VISIBLE or View.GONE.

Parameters
visible whether the toolbar switcher button should be visible

public void setToolbarsVisible (boolean visible, boolean animateBottomBar)

Handles changing the visibility of toolbars.

Parameters
visible True if toolbar is visible
animateBottomBar True if visibility should be changed with animation

public void setViewerOverlayUIVisible (boolean visible)

The implementation should change the visibility of top toolbar, bottom navigation bar as well as system navigation bar.

public void showToolbarWithTag (String toolbarTag)

Show the toolbar with given toolbar tag. Must only be called after onCreate.

Parameters
toolbarTag the toolbar tag defined by the toolbar to show

public void showUI ()

Shows the UI.

public void startSearchMode ()

Starts the search mode.

public void toolbarButtonVisibility (ToolbarButtonType buttonType, boolean visibility)

Set visibility of annotation toolbar button

Parameters
buttonType of toolbar button
visibility of toolbar button to set

public void updateToolbarState ()

Updates the toolbar state depending on ToolManager state.