java.lang.Object | ||
↳ | Fragment | |
↳ | com.pdftron.pdf.controls.PdfViewCtrlTabHostBaseFragment |
![]() |
![]() |
The PdfViewCtrlTabHostBaseFragment is a base class for other viewer host classes.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | PdfViewCtrlTabHostBaseFragment.AppBarVisibilityListener | Callback interface to be invoked when AppBar visibility changes. | |||||||||
interface | PdfViewCtrlTabHostBaseFragment.ReflowControlListener | ||||||||||
interface | PdfViewCtrlTabHostBaseFragment.TabHostListener | Callback interface to be invoked when an interaction is needed. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ANIMATE_DURATION_HIDE | ||||||||||
int | ANIMATE_DURATION_SHOW | ||||||||||
String | BUNDLE_TAB_FRAGMENT_CLASS | ||||||||||
String | BUNDLE_TAB_HOST_CONFIG | ||||||||||
String | BUNDLE_TAB_HOST_NAV_ICON | ||||||||||
String | BUNDLE_TAB_HOST_QUIT_APP_WHEN_DONE_VIEWING | ||||||||||
String | BUNDLE_TAB_HOST_TOOLBAR_MENU | ||||||||||
String | BUNDLE_THEME |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PdfViewCtrlTabHostBaseFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addHostListener(PdfViewCtrlTabHostBaseFragment.TabHostListener listener)
Adds the
PdfViewCtrlTabHostBaseFragment.TabHostListener listener. | ||||||||||
void |
addNewPage()
Adds a new page.
| ||||||||||
void |
addReflowControlListener(PdfViewCtrlTabHostBaseFragment.ReflowControlListener listener)
Adds a
PdfViewCtrlTabHostBaseFragment.ReflowControlListener listener. | ||||||||||
TabLayout.Tab |
addTab(Bundle args, String tag, String title, String fileExtension, String password, int itemSource)
Adds a new tab
| ||||||||||
boolean |
checkTabConversionAndAlert(int messageID, boolean allowConverted, boolean skipSpecialFileCheck)
Checks tab conversion and shows the alert.
| ||||||||||
boolean |
checkTabConversionAndAlert(int messageID, boolean allowConverted)
The overloaded implementation of
checkTabConversionAndAlert(int, boolean) . | ||||||||||
void |
clearHostListeners()
Removes all
PdfViewCtrlTabHostBaseFragment.TabHostListener listeners. | ||||||||||
void |
clearReflowControlListeners()
Removes all
PdfViewCtrlTabHostBaseFragment.ReflowControlListener listeners. | ||||||||||
void |
closeAllTabs()
Closes all tabs.
| ||||||||||
void |
closeTab(String tag)
Closes the specified tab.
| ||||||||||
void |
createTabs(Bundle args)
Creates tabs.
| ||||||||||
void |
exitSearchMode()
Exits the search mode.
| ||||||||||
PdfViewCtrlTabBaseFragment |
getCurrentPdfViewCtrlFragment()
Returns the selected
PdfViewCtrlTabBaseFragment . | ||||||||||
int |
getTabCount()
Returns the number of tabs.
| ||||||||||
Toolbar | getToolbar() | ||||||||||
int |
getToolbarHeight()
The overload implementation of
getToolbarHeight() . | ||||||||||
boolean |
handleBackPressed()
Handles when back button is pressed.
| ||||||||||
boolean | handleKeyShortcutEvent(int keyCode, KeyEvent event) | ||||||||||
boolean |
handleKeyUp(int keyCode, KeyEvent event)
Handles key when pressed up.
| ||||||||||
abstract void |
hideUI()
Hides the UI.
| ||||||||||
boolean | isInFullScreenMode() | ||||||||||
void |
onActivityCreated(Bundle savedInstanceState)
The overload implementation of Fragment#onActivityCreated(Bundle).
| ||||||||||
void |
onAnnotationClicked(Annot annotation, int pageNum)
The overload implementation of
onAnnotationClicked(Annot, int) . | ||||||||||
void |
onAutoCropTaskDone()
The overload implementation of
onAutoCropTaskDone() . | ||||||||||
boolean |
onBackPressed()
Called when onBackPressed is called when viewing a document.
| ||||||||||
void |
onBookmarksDialogDismissed(int tabIndex)
The overloaded implementation of
onBookmarksDialogDismissed(int) . | ||||||||||
void | onBookmarksDialogWillDismiss(int tabIndex) | ||||||||||
void |
onConfigurationChanged(Configuration newConfig)
The overload implementation of Fragment#onConfigurationChanged(Configuration).
| ||||||||||
void |
onCreate(Bundle savedInstanceState)
The overload implementation of Fragment#onCreate(Bundle).
| ||||||||||
void |
onCreateOptionsMenu(Menu menu, MenuInflater inflater)
The overload implementation of Fragment#onCreateOptionsMenu(Menu, MenuInflater).
| ||||||||||
View |
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
The overload implementation of Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle).
| ||||||||||
boolean |
onCustomColorModeSelected(int bgColor, int txtColor)
The overloaded implementation of
onCustomColorModeSelected(int, int) . | ||||||||||
void |
onDestroy()
The overload implementation of Fragment#onDestroy().
| ||||||||||
void |
onDestroyView()
The overload implementation of Fragment#onDestroyView().
| ||||||||||
void |
onDownloadedSuccessful()
The overload implementation of
onDownloadedSuccessful() . | ||||||||||
abstract void | onEditToolbarMenu() | ||||||||||
void |
onExportAnnotations(PDFDoc pdfDoc)
The overload implementation of
onExportAnnotations(PDFDoc) . | ||||||||||
void |
onExportThumbnails(SparseBooleanArray pageNums)
The overload implementation of
onExportThumbnails(SparseBooleanArray) . | ||||||||||
void | onFlattenOptionSelected() | ||||||||||
SearchResultsView.SearchResultStatus |
onFullTextSearchFindText(boolean searchUp)
The overload implementation of
onFullTextSearchFindText(boolean) . | ||||||||||
void |
onFullTextSearchStart()
The overload implementation of
onFullTextSearchStart() . | ||||||||||
boolean |
onHandleKeyShortcutEvent(int keyCode, KeyEvent event)
Called when key shortcut event triggered
| ||||||||||
void |
onInkEditSelected(Annot inkAnnot, int pageNum)
The overload implementation of
onInkEditSelected(Annot, int) . | ||||||||||
void |
onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
The overload implementation of
onLayoutChange(View, int, int, int, int, int, int, int, int) . | ||||||||||
void |
onOpenAddNewTab(Bundle args)
Creates and opens a new tab.
| ||||||||||
void |
onOpenAddNewTab(int itemSource, String tag, String title, String password)
The overload implementation of
onOpenAddNewTab(int, String, String, String) . | ||||||||||
abstract void |
onOpenAnnotationToolbar(ToolManager.ToolMode mode)
The overload implementation of
onOpenAnnotationToolbar(ToolMode) . | ||||||||||
abstract void |
onOpenEditToolbar(ToolManager.ToolMode mode)
The overload implementation of
onOpenEditToolbar(ToolMode) . | ||||||||||
boolean |
onOptionsItemSelected(MenuItem item)
The overload implementation of Fragment#onOptionsItemSelected(MenuItem).
| ||||||||||
void |
onOutlineClicked(Bookmark parent, Bookmark bookmark)
The overload implementation of
onOutlineClicked(Bookmark, Bookmark) . | ||||||||||
void |
onOutlineOptionSelected(int initialTabIndex)
Called when outline option has been selected.
| ||||||||||
void |
onOutlineOptionSelected()
Called when outline option has been selected.
| ||||||||||
void |
onPageThumbnailOptionSelected(boolean thumbnailEditMode, Integer checkedItem)
The overload implementation of
onPageThumbnailOptionSelected(boolean, Integer) . | ||||||||||
void |
onPause()
The overload implementation of Fragment#onPause().
| ||||||||||
void |
onPrepareOptionsMenu(Menu menu)
The overload implementation of Fragment#onPrepareOptionsMenu(Menu).
| ||||||||||
boolean |
onQuickMenuClicked(QuickMenuItem menuItem)
The overloaded implementation of
onQuickMenuClicked(QuickMenuItem) . | ||||||||||
void |
onQuickMenuDismissed()
The overloaded implementation of
onQuickMenuDismissed() . | ||||||||||
void |
onQuickMenuShown()
The overloaded implementation of
onQuickMenuShown() . | ||||||||||
int |
onReflowZoomInOut(boolean flagZoomIn)
The overloaded implementation of
onReflowZoomInOut(boolean) . | ||||||||||
void |
onResume()
The overload implementation of Fragment#onResume().
| ||||||||||
void | onSaveAsOptionSelected() | ||||||||||
void | onSaveCroppedCopySelected() | ||||||||||
void |
onSaveInstanceState(Bundle outState)
The overload implementation of Fragment#onSaveInstanceState(Bundle).
| ||||||||||
void | onSaveOptimizedCopySelected() | ||||||||||
void | onSavePasswordCopySelected() | ||||||||||
void | onSearchOptionSelected() | ||||||||||
void |
onSearchProgressHide()
The overload implementation of
onSearchProgressHide() . | ||||||||||
void |
onSearchProgressShow()
The overload implementation of
onSearchProgressShow() . | ||||||||||
void |
onSearchResultClicked(TextSearchResult result)
The overload implementation of
onSearchResultClicked(TextSearchResult) . | ||||||||||
void |
onSearchResultFound(TextSearchResult result)
The overload implementation of
onSearchResultFound(TextSearchResult) . | ||||||||||
boolean |
onShowQuickMenu(QuickMenu quickmenu, Annot annot)
Called when quick menu is about to show.
| ||||||||||
void |
onShowTabInfo(String tag, String title, String fileExtension, int itemSource, int duration)
Called when show tab info has been triggered.
| ||||||||||
void | onStart() | ||||||||||
void | onStop() | ||||||||||
void |
onSystemUiVisibilityChange(int visibility)
The overload implementation of
onSystemUiVisibilityChange(int) . | ||||||||||
void |
onTabDocumentLoaded(String tag)
The overload implementation of
onTabDocumentLoaded(String) . | ||||||||||
void |
onTabError(int errorCode, String info)
The overload implementation of
onTabError(int, String) . | ||||||||||
void |
onTabIdentityChanged(String oldTabTag, String newTabTag, String newTabTitle, String newFileExtension, int newTabSource)
The overload implementation of
onTabIdentityChanged(String, String, String, String, int) . | ||||||||||
void |
onTabJumpToSdCardFolder()
Called when an SD card file is opened as a local file
| ||||||||||
void |
onTabPaused(FileInfo fileInfo, boolean isDocModifiedAfterOpening)
The overload implementation of
onTabPaused(FileInfo, boolean) . | ||||||||||
abstract void |
onTabSingleTapConfirmed()
The overload implementation of
onTabSingleTapConfirmed() . | ||||||||||
void |
onTabThumbSliderStopTrackingTouch()
The overload implementation of
onTabThumbSliderStopTrackingTouch() . | ||||||||||
void |
onThumbnailsEditAttemptWhileReadOnly()
The overload implementation of
onThumbnailsEditAttemptWhileReadOnly() . | ||||||||||
void |
onThumbnailsViewDialogDismiss(int pageNum, boolean docPagesModified)
The overload implementation of
onThumbnailsViewDialogDismiss(int, boolean) . | ||||||||||
void |
onToggleReflow()
The overload implementation of
onToggleReflow() . | ||||||||||
void |
onUndoRedoPopupClosed()
The overload implementation of
onUndoRedoPopupClosed() . | ||||||||||
void |
onUpdateOptionsMenu()
Called when toolbar overflow menu should be updated
| ||||||||||
void |
onUserBookmarkClick(int pageNum)
The overload implementation of
onUserBookmarkClicked(int) . | ||||||||||
void |
onUserCropDialogDismiss(int pageNumberAtDismiss)
The overload implementation of
onUserCropDialogDismiss(int) . | ||||||||||
void |
onUserCropMethodSelected(int cropMode)
The overload implementation of
onUserCropMethodSelected(int) . | ||||||||||
void |
onUserCropSelectionDialogFragmentDismiss()
The overload implementation of
onUserCropSelectionDialogFragmentDismiss() . | ||||||||||
void |
onViewCreated(View view, Bundle savedInstanceState)
The overload implementation of Fragment#onViewCreated(View, Bundle).
| ||||||||||
boolean |
onViewModeColorSelected(int colorMode)
The overloaded implementation of
onViewModeColorSelected(int) . | ||||||||||
void |
onViewModeOptionSelected()
Called when view mode option has been selected.
| ||||||||||
void |
onViewModePickerDialogFragmentDismiss()
The overloaded implementation of
onViewModePickerDialogFragmentDismiss() . | ||||||||||
void |
onViewModeSelected(String viewMode, boolean thumbnailEditMode, Integer checkedItem)
Handles when view mode is selected.
| ||||||||||
void |
onViewModeSelected(String viewMode)
The overloaded implementation of
onViewModeSelected(String) . | ||||||||||
boolean |
readAndUnsetFileSystemChanged()
Reads and Unsets file system changed.
| ||||||||||
void |
removeExtraTabs()
Removes extra tabs.
| ||||||||||
void |
removeHostListener(PdfViewCtrlTabHostBaseFragment.TabHostListener listener)
Removes the
PdfViewCtrlTabHostBaseFragment.TabHostListener listener. | ||||||||||
void |
removeReflowControlListener(PdfViewCtrlTabHostBaseFragment.ReflowControlListener listener)
Removes the
PdfViewCtrlTabHostBaseFragment.ReflowControlListener listener. | ||||||||||
void |
removeTab(String filepath)
Removes the specified tab.
| ||||||||||
void |
removeTab(String filepath, String nextTabTagToSelect)
Removes the specified tab.
| ||||||||||
void |
removeTabAt(int index)
Removes the specified tab at index.
| ||||||||||
void |
resetHideToolbarsTimer()
The overloaded implementation of
resetHideToolbarsTimer() . | ||||||||||
void |
setAppBarVisibilityListener(PdfViewCtrlTabHostBaseFragment.AppBarVisibilityListener listener)
Sets the
PdfViewCtrlTabHostBaseFragment.AppBarVisibilityListener listener. | ||||||||||
void |
setCurrentTabByTag(String tag)
Selects the tab that has the specified tag.
| ||||||||||
static void | setDebug(boolean debug) | ||||||||||
void |
setLongPressEnabled(boolean enabled)
Sets if the host can dispatch long press event.
| ||||||||||
void |
setThumbSliderVisibility(boolean visible, boolean animate)
Sets the visibility of thumbnail slider.
| ||||||||||
void |
setToolbarTimerDisabled(boolean disable)
Whether to disable the auto hide Toolbar timer
| ||||||||||
void |
setToolbarsVisible(boolean visible)
Handles changing the visibility of toolbars.
| ||||||||||
abstract 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 | setupRedaction() | ||||||||||
void |
showTabInfo(String message, String path, String tag, int itemSource, int duration)
Shows tab information in a snack bar
| ||||||||||
abstract void |
showUI()
Shows the UI.
| ||||||||||
void | startSearchMode() | ||||||||||
void |
stopHideToolbarsTimer()
Stops timer for hiding toolbar.
| ||||||||||
boolean |
updateColorMode()
Updates color mode.
| ||||||||||
void | updateToolbarDrawable() |
Adds the PdfViewCtrlTabHostBaseFragment.TabHostListener
listener.
listener | The listener |
---|
Adds a new page.
Adds a PdfViewCtrlTabHostBaseFragment.ReflowControlListener
listener.
listener | The listener |
---|
Adds a new tab
args | The argument needed to create PdfViewCtrlTabBaseFragment |
---|---|
tag | The tab tag |
title | The title |
fileExtension | The file extension |
password | The password |
itemSource | The item source of the document |
Checks tab conversion and shows the alert.
messageID | The message ID |
---|---|
allowConverted | True if conversion is allowed |
skipSpecialFileCheck | True if spcecial files should be skipped |
The overloaded implementation of checkTabConversionAndAlert(int, boolean)
.
messageID | The message ID |
---|---|
allowConverted | True if conversion is allowed |
Removes all PdfViewCtrlTabHostBaseFragment.TabHostListener
listeners.
Removes all PdfViewCtrlTabHostBaseFragment.ReflowControlListener
listeners.
Closes all tabs.
Closes the specified tab.
tag | the tab tag |
---|
Creates tabs.
args | The arguments |
---|
Exits the search mode.
Returns the selected PdfViewCtrlTabBaseFragment
.
Returns the number of tabs.
The overload implementation of getToolbarHeight()
.
Handles when back button is pressed.
Handles key when pressed up.
keyCode | The key code |
---|---|
event | The key event |
Hides the UI.
The overload implementation of Fragment#onActivityCreated(Bundle).
The overload implementation of onAnnotationClicked(Annot, int)
.
annotation | The annotation |
---|---|
pageNum | The page number that holds the annotation |
Called when onBackPressed is called when viewing a document.
The overloaded implementation of onBookmarksDialogDismissed(int)
.
tabIndex | The index of selected tab when dismissed |
---|
The overload implementation of Fragment#onConfigurationChanged(Configuration).
The overload implementation of Fragment#onCreate(Bundle).
The overload implementation of Fragment#onCreateOptionsMenu(Menu, MenuInflater).
The overload implementation of Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle).
The overloaded implementation of onCustomColorModeSelected(int, int)
.
bgColor | The selected background color |
---|---|
txtColor | The selected text color |
The overload implementation of Fragment#onDestroy().
The overload implementation of Fragment#onDestroyView().
The overload implementation of onExportAnnotations(PDFDoc)
.
pdfDoc | The PDFDoc containing the exported annotations |
---|
The overload implementation of onExportThumbnails(SparseBooleanArray)
.
pageNums | The page numbers to be exported |
---|
The overload implementation of onFullTextSearchFindText(boolean)
.
searchUp | True if should go to previous search (up) |
---|
Called when key shortcut event triggered
The overload implementation of onInkEditSelected(Annot, int)
.
inkAnnot | The annotation |
---|---|
pageNum | The page number |
The overload implementation of onLayoutChange(View, int, int, int, int, int, int, int, int)
.
Creates and opens a new tab.
args | The arguments needed to create a new tab |
---|
The overload implementation of onOpenAddNewTab(int, String, String, String)
.
itemSource | The item source of document |
---|---|
tag | The tab tag |
title | The name of the document |
password | The password |
The overload implementation of onOpenAnnotationToolbar(ToolMode)
.
mode | The tool mode |
---|
The overload implementation of onOpenEditToolbar(ToolMode)
.
mode | The tool mode |
---|
The overload implementation of Fragment#onOptionsItemSelected(MenuItem).
The overload implementation of onOutlineClicked(Bookmark, Bookmark)
.
parent | The parent bookmark if any |
---|---|
bookmark | The clicked bookmark |
Called when outline option has been selected.
initialTabIndex | The tab index which should be selected after bookmarks dialog is created |
---|
Called when outline option has been selected.
The overload implementation of onPageThumbnailOptionSelected(boolean, Integer)
.
thumbnailEditMode | true if thumbnail is in edit mode |
---|---|
checkedItem | The index of the item that is checked |
The overload implementation of Fragment#onPause().
The overload implementation of Fragment#onPrepareOptionsMenu(Menu).
The overloaded implementation of onQuickMenuClicked(QuickMenuItem)
.
menuItem | The quick menu item |
---|
The overloaded implementation of onReflowZoomInOut(boolean)
.
flagZoomIn | True if zoom in; False if zoom out |
---|
The overload implementation of Fragment#onResume().
The overload implementation of Fragment#onSaveInstanceState(Bundle).
The overload implementation of onSearchResultClicked(TextSearchResult)
.
result | The text search result |
---|
The overload implementation of onSearchResultFound(TextSearchResult)
.
result | The text search result |
---|
Called when quick menu is about to show.
quickmenu | the quick menu that is about to show |
---|---|
annot | the selected annot, null if no annot is selected |
Called when show tab info has been triggered.
The overload implementation of onSystemUiVisibilityChange(int)
.
The overload implementation of onTabDocumentLoaded(String)
.
tag | The tab tab |
---|
The overload implementation of onTabError(int, String)
.
errorCode | The code of error |
---|---|
info | The information |
The overload implementation of onTabIdentityChanged(String, String, String, String, int)
.
oldTabTag | The old tab tag |
---|---|
newTabTag | The new tab tag |
newTabTitle | The new title of the tab |
newFileExtension | The new extension of the document |
newTabSource | The new item source of document |
Called when an SD card file is opened as a local file
The overload implementation of onTabPaused(FileInfo, boolean)
.
fileInfo | The file shown when tab has been paused |
---|---|
isDocModifiedAfterOpening | True if document has been modified after opening |
The overload implementation of onTabSingleTapConfirmed()
.
The overload implementation of onTabThumbSliderStopTrackingTouch()
.
The overload implementation of onThumbnailsEditAttemptWhileReadOnly()
.
The overload implementation of onThumbnailsViewDialogDismiss(int, boolean)
.
pageNum | The selected page number |
---|---|
docPagesModified | True if the pages of the document has been modified |
Called when toolbar overflow menu should be updated
The overload implementation of onUserBookmarkClicked(int)
.
pageNum | The page number |
---|
The overload implementation of onUserCropDialogDismiss(int)
.
pageNumberAtDismiss | The current page number when it was dismissed |
---|
The overload implementation of onUserCropMethodSelected(int)
.
cropMode | The crop mode. The possible values are #MODE_AUTO_CROP, #MODE_MANUAL_CROP, #MODE_RESET_CROP |
---|
The overload implementation of onUserCropSelectionDialogFragmentDismiss()
.
The overload implementation of Fragment#onViewCreated(View, Bundle).
The overloaded implementation of onViewModeColorSelected(int)
.
colorMode | The color mode |
---|
Called when view mode option has been selected.
The overloaded implementation of onViewModePickerDialogFragmentDismiss()
.
Handles when view mode is selected.
viewMode | the view mode |
---|---|
thumbnailEditMode | True if thumbnail is in edit mode |
checkedItem | The checked item |
The overloaded implementation of onViewModeSelected(String)
.
viewMode | The selected view mode |
---|
Reads and Unsets file system changed.
Removes extra tabs.
Removes the PdfViewCtrlTabHostBaseFragment.TabHostListener
listener.
listener | The listener |
---|
Removes the PdfViewCtrlTabHostBaseFragment.ReflowControlListener
listener.
listener | The listener |
---|
Removes the specified tab.
filepath | The file path |
---|
Removes the specified tab.
filepath | The file path |
---|---|
nextTabTagToSelect | The tab tag of the tab that should be selected thereafter |
Removes the specified tab at index.
index | index of the tab |
---|
Sets the PdfViewCtrlTabHostBaseFragment.AppBarVisibilityListener
listener.
listener | The listener |
---|
Selects the tab that has the specified tag.
tag | The tab tag |
---|
Sets if the host can dispatch long press event.
enabled | True to make the host able to read long press event |
---|
Sets the visibility of thumbnail slider.
visible | True if visible |
---|---|
animate | True if visibility should be changed with animation |
Whether to disable the auto hide Toolbar timer
disable | true if timer is disabled, false otherwise |
---|
Handles changing the visibility of toolbars.
visible | True if toolbar is visible |
---|
Handles changing the visibility of toolbars.
visible | True if toolbar is visible |
---|---|
animateBottomBar | True if visibility should be changed with animation |
The implementation should change the visibility of top toolbar, bottom navigation bar as well as system navigation bar.
Shows tab information in a snack bar
message | The message |
---|---|
path | The file path |
tag | The tab tag |
itemSource | The item source of the document |
Shows the UI.
Stops timer for hiding toolbar.
Updates color mode.