java.lang.Object | ||
↳ | AppCompatActivity | |
↳ | com.pdftron.demo.app.AdvancedReaderActivity |
AdvancedReaderActivity is derived from AppCompatActivity and is an all-in-one document reader, PDF editor and file manager.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MAX_PASSWORD_ATTEMPTS | ||||||||||
int | MENU_ITEM_NONE | ||||||||||
int | PDFDOC_TYPE_ENCRYPTED | ||||||||||
int | PDFDOC_TYPE_FILE | ||||||||||
int | PDFDOC_TYPE_PORTFOLIO | ||||||||||
int | PDFDOC_TYPE_UNKNOWN | ||||||||||
int | PDFDOC_TYPE_XFA |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AdvancedReaderActivity() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
canRecreateActivity()
Called when about the re-create Activity for day/night mode
| ||||||||||
boolean |
canShowFileCloseSnackbar()
The implementation should determine whether closing a tab should show re-open snackbar.
| ||||||||||
boolean |
canShowFileInFolder()
The implementation should determine whether the long press on tab widget should show file info.
| ||||||||||
int |
checkPdfDocTypeAndClose(PDFDoc tempDoc, String password)
Returns the
PDFDoc file type which is one of: PDFDOC_TYPE_ENCRYPTED , PDFDOC_TYPE_FILE ,
PDFDOC_TYPE_PORTFOLIO , PDFDOC_TYPE_UNKNOWN , PDFDOC_TYPE_XFA . | ||||||||||
void |
dismissDialogFragment(String tag)
Dismisses a dialog fragment (if visible) in the fragment manager via its tag.
| ||||||||||
boolean | dispatchKeyShortcutEvent(KeyEvent event) | ||||||||||
String |
getContentUriName(Uri dataUri)
Returns the file name (including the file extension) of the given content Uri.
| ||||||||||
void | gotoExternalTab() | ||||||||||
void | onActivityResult(int requestCode, int resultCode, Intent data) | ||||||||||
void | onBackPressed() | ||||||||||
void | onConfigurationChanged(Configuration newConfig) | ||||||||||
boolean | onCreateOptionsMenu(Menu menu) | ||||||||||
void |
onEditPdfIntentReceived(Uri dataUri, boolean skipPermission)
Opens a Uri that points to a PDF file in the document viewer.
| ||||||||||
void | onEditUriSelected(String fileUri) | ||||||||||
void |
onExitSearchMode()
Called when search view collapsed
| ||||||||||
void | onExternalFileSelected(String encodedUri, String password) | ||||||||||
void | onExternalFolderSelected(String folderUri) | ||||||||||
void |
onFileSelected(File file, String password, boolean skipPasswordCheck)
Opens a local document in the document viewer.
| ||||||||||
void |
onFileSelected(File file, String password)
A file (item) was selected (single tap) from the list.
| ||||||||||
void | onFolderSelected(String absolutePath) | ||||||||||
void |
onJumpToSdCardFolder()
Called when an SD card file is opened as a local file
| ||||||||||
boolean | onKeyUp(int keyCode, KeyEvent event) | ||||||||||
void |
onLastTabClosed()
Called when the last tab in the tab host has been closed, and therefore there is no more tab.
| ||||||||||
void | onLowMemory() | ||||||||||
void |
onNavButtonPressed()
Called when navigation button has been pressed.
| ||||||||||
boolean | onNavigationItemSelected(MenuItem menuItem) | ||||||||||
void | onNewIntent(Intent intent) | ||||||||||
void | onOfficeUriSelected(Uri fileUri) | ||||||||||
boolean |
onOpenDocError()
Called when an error has been happened when opening a document.
| ||||||||||
boolean | onOptionsItemSelected(MenuItem item) | ||||||||||
void |
onPasswordDialogDismiss(boolean forcedDismiss)
Called when dialog is dismissed
| ||||||||||
void |
onPasswordDialogNegativeClick(int fileType, File file, String path)
Called when Cancel button has been clicked.
| ||||||||||
void |
onPasswordDialogPositiveClick(int fileType, File file, String path, String password, String id)
Called when OK button has been clicked.
| ||||||||||
void | onPortfolioDialogFragmentFileClicked(int fileType, PortfolioDialogFragment dialog, String fileName) | ||||||||||
void | onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) | ||||||||||
void |
onShowFileInFolder(String filename, String filepath, int itemSource)
The implementation should browse to the specified file in the folder.
| ||||||||||
void |
onStartSearchMode()
Called when search view expanded
| ||||||||||
void |
onTabChanged(String tag)
Called when a new tab has been selected excluding the initial tab.
| ||||||||||
void |
onTabDocumentLoaded(String tag)
Called when document associated with a tab is loaded
| ||||||||||
void |
onTabHostHidden()
Called when the tab host has been hidden.
| ||||||||||
void |
onTabHostShown()
Called when the tab host has been shown.
| ||||||||||
void |
onTabPaused(FileInfo fileInfo, boolean isDocModifiedAfterOpening)
Called when the fragment is paused.
| ||||||||||
boolean |
onToolbarCreateOptionsMenu(Menu menu, MenuInflater inflater)
Called when creating Toolbar options menu
| ||||||||||
boolean |
onToolbarOptionsItemSelected(MenuItem item)
Called when Toolbar options menu selected
| ||||||||||
boolean |
onToolbarPrepareOptionsMenu(Menu menu)
Called when preparing Toolbar options menu
| ||||||||||
void | onTrimMemory(int level) | ||||||||||
static void |
open(Context packageContext)
Opens the CompleteReader demo app.
| ||||||||||
void |
selectNavigationItem(MenuItem menuItem)
Selects a drawer navigation menu item.
| ||||||||||
static void |
setDebug(boolean debug)
Used to enable debug mode to show verbose debug Logcat messages.
| ||||||||||
FileInfoDrawer | showFileInfoDrawer(FileInfoDrawer.Callback callback) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface com.pdftron.demo.navigation.callbacks.FilePickerCallbacks | |||||||||||
From interface com.pdftron.demo.navigation.callbacks.FileUtilCallbacks | |||||||||||
From interface com.pdftron.demo.navigation.callbacks.JumpNavigationCallbacks | |||||||||||
From interface
com.pdftron.pdf.controls.PasswordDialogFragment.PasswordDialogFragmentListener
| |||||||||||
From interface
com.pdftron.pdf.controls.PdfViewCtrlTabHostBaseFragment.TabHostListener
| |||||||||||
From interface
com.pdftron.pdf.dialog.PortfolioDialogFragment.PortfolioDialogFragmentListener
|
Called when about the re-create Activity for day/night mode
The implementation should determine whether closing a tab should show re-open snackbar.
The implementation should determine whether the long press on tab widget should show file info.
Returns the PDFDoc
file type which is one of: PDFDOC_TYPE_ENCRYPTED
, PDFDOC_TYPE_FILE
,
PDFDOC_TYPE_PORTFOLIO
, PDFDOC_TYPE_UNKNOWN
, PDFDOC_TYPE_XFA
.
Dismisses a dialog fragment (if visible) in the fragment manager via its tag.
tag | of the dialog fragment to dismiss |
---|
Returns the file name (including the file extension) of the given content Uri.
dataUri | content uri to get the file name |
---|
Opens a Uri that points to a PDF file in the document viewer. If skip permission is enabled, the content Uri will be converted to a local file before being opened.
dataUri | content Uri to a PDF document |
---|---|
skipPermission | true to save the Uri as a file locally before viewing the file, false to open the content Uri directly |
Called when search view collapsed
Opens a local document in the document viewer.
file | that represents a local document |
---|---|
password | password used to open document, can be null |
skipPasswordCheck | true to skip password check when opening the document |
A file (item) was selected (single tap) from the list.
Called when an SD card file is opened as a local file
Called when the last tab in the tab host has been closed, and therefore there is no more tab.
Called when navigation button has been pressed.
Called when an error has been happened when opening a document.
Called when dialog is dismissed
forcedDismiss | True if the dialog is forced to dismiss |
---|
Called when Cancel button has been clicked.
fileType | The file type |
---|---|
file | The file |
path | The file path |
Called when OK button has been clicked.
fileType | The file type |
---|---|
file | The file |
path | The file path |
password | The entered password |
id | The ID |
The implementation should browse to the specified file in the folder.
filename | The file name |
---|---|
filepath | The file path |
itemSource | The item source of the file |
Called when search view expanded
Called when a new tab has been selected excluding the initial tab.
tag | the tab tag changed to |
---|
Called when document associated with a tab is loaded
tag | the document tag |
---|
Called when the tab host has been hidden.
Called when the tab host has been shown.
Called when the fragment is paused.
fileInfo | The file shown when tab has been paused |
---|---|
isDocModifiedAfterOpening | True if document has been modified after opening; False otherwise |
Called when creating Toolbar options menu
menu | the menu |
---|---|
inflater | the inflater |
Called when Toolbar options menu selected
item | the menu item |
---|
Called when preparing Toolbar options menu
menu | the menu |
---|
Opens the CompleteReader demo app.
packageContext | the context |
---|
Selects a drawer navigation menu item. A list of side navigation menu item ids can be found in the ids.xml file.
menuItem | the selected drawer navigation menu item that that this activity will navigate to |
---|
Used to enable debug mode to show verbose debug Logcat messages.
debug | true to enable debug mode, false otherwise |
---|