com.pspdfkit.ui.PSPDFKitViews |
Interface for convenient access to views in a PSPDFKit activity.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | PSPDFKitViews.PSPDFView | Shared interface of all auxiliary views (search view, thumbnail bar, grid, etc.) that are
hosted inside the PdfActivity . |
|||||||||
enum | PSPDFKitViews.Type | Known auxiliary view types. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Add on visibility changed listener to every instantiated view.
| ||||||||||
abstract PSPDFKitViews.Type |
getActiveViewType()
Returns currently displayed view over the document.
| ||||||||||
abstract AudioView |
getAudioInspector()
Returns currently instantiated
AudioView . | ||||||||||
abstract PdfDocumentInfoView |
getDocumentInfoView()
Returns currently instantiated
PdfDocumentInfoView . | ||||||||||
abstract TextView |
getDocumentTitleOverlayView()
Returns the currently instantiated document title view.
| ||||||||||
abstract View |
getEmptyView()
Returns currently instantiated view that is shown when no document is loaded.
| ||||||||||
abstract FormEditingBar |
getFormEditingBarView()
Returns currently instantiated
FormEditingBar . | ||||||||||
abstract View |
getNavigateBackButton()
Returns the currently instantiate navigate back button.
| ||||||||||
abstract View |
getNavigateForwardButton()
Returns the currently instantiate navigate forward button.
| ||||||||||
abstract PdfOutlineView |
getOutlineView()
Returns currently instantiated
PdfOutlineView . | ||||||||||
abstract TextView |
getPageNumberOverlayView()
Returns currently instantiated page number view.
| ||||||||||
abstract PdfReaderView |
getReaderView()
Returns currently instantiated
PdfReaderView . | ||||||||||
abstract RedactionView |
getRedactionView()
Returns currently instantiated
RedactionView . | ||||||||||
abstract PdfSearchView |
getSearchView()
Returns currently instantiated
PdfSearchView . | ||||||||||
abstract PdfTabBar |
getTabBar()
Returns the currently instantiated tab bar view.
| ||||||||||
abstract PdfThumbnailBar |
getThumbnailBarView()
Returns currently instantiated
PdfThumbnailBar . | ||||||||||
abstract PdfThumbnailGrid |
getThumbnailGridView()
Returns currently instantiated
PdfThumbnailGrid . | ||||||||||
abstract PSPDFKitViews.PSPDFView |
getViewByType(PSPDFKitViews.Type type)
Returns view by the specified type.
| ||||||||||
abstract void |
onRestoreViewHierarchyState(Bundle state)
Called after activity recreation, to restore state of views that otherwise wouldn't be
restored.
| ||||||||||
abstract void |
onSaveViewHierarchyState(Bundle outState)
Called while persisting the activity to persist state of views that otherwise wouldn't be
stored.
| ||||||||||
abstract void |
removeOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Remove on visibility changed listener from every instantiated view.
| ||||||||||
abstract void |
resetDocument()
Reset/clear the document on all instantiated views.
| ||||||||||
abstract void |
setDocument(PdfDocument document)
Sets the document to all instantiated views.
| ||||||||||
abstract boolean |
showView(PSPDFKitViews.Type viewType)
Similar to
toggleView(Type) but not hiding the view if it is already visible. | ||||||||||
abstract boolean |
toggleView(PSPDFKitViews.Type typeToToggle, long showDelay)
Toggles the view with the specified type.
| ||||||||||
abstract boolean |
toggleView(PSPDFKitViews.Type typeToToggle)
Toggles the view with the specified type.
|
Add on visibility changed listener to every instantiated view. If the listener has already
been added previously, this method will be a no-op. Adding null
is not allowed, and
will result in an exception.
listener | OnVisibilityChangedListener that should be notified. Must be
non-null. |
---|
Returns currently displayed view over the document.
VIEW_NONE
if none active.
Returns currently instantiated AudioView
.
null
if audio inspector is
deactivated by the current configuration or was not present in the activity layout.
Returns currently instantiated PdfDocumentInfoView
.
null
if document info view is not separated from the outline view
Returns the currently instantiated document title view.
null
if document title overlay
is deactivated by the current configuration.
Returns currently instantiated view that is shown when no document is loaded.
null
if no view is set.
Returns currently instantiated FormEditingBar
.
null
if form editing bar is
deactivated by the current configuration.
Returns the currently instantiate navigate back button.
null
if navigation buttons are
deactivated by the current configuration.
Returns the currently instantiate navigate forward button.
null
if navigation buttons
are deactivated by the current configuration.
Returns currently instantiated PdfOutlineView
.
null
if outline is deactivated by the
current configuration.
Returns currently instantiated page number view.
null
if page number overlay is
deactivated by the current configuration.
Returns currently instantiated PdfReaderView
.
null
if deactivated by the current
configuration or not supported on the device as Android Web View is not present.
Returns currently instantiated RedactionView
.
null
if redaction UI is deactivated
by current configuration.
Returns currently instantiated PdfSearchView
.
null
if search is deactivated by the current
configuration.
Returns the currently instantiated tab bar view.
null
if tab bar is deactivated in the
current configuration.
Returns currently instantiated PdfThumbnailBar
.
null
if thumbnail bar is deactivated
by the current configuration.
Returns currently instantiated PdfThumbnailGrid
.
null
if thumbnail grid is
deactivated by the current configuration.
Returns view by the specified type.
type | Type of the view to be returned |
---|
Called after activity recreation, to restore state of views that otherwise wouldn't be restored.
state | State that was restored. |
---|
Called while persisting the activity to persist state of views that otherwise wouldn't be stored.
outState | Outgoing bundle on which to save the state. |
---|
Remove on visibility changed listener from every instantiated view. Upon calling this method
the listener
will no longer be notified of any changes. If the listener has not been
added, this method will be a no-op. Adding null
is not allowed,and will result in an
exception.
listener | OnVisibilityChangedListener that should be removed from all views.
Must be non-null. |
---|
Reset/clear the document on all instantiated views.
Sets the document to all instantiated views. This has to be called on the main thread.
document | Document to be set. |
---|
Similar to toggleView(Type)
but not hiding the view if it is already visible.
viewType | PSPDFKitViews.Type of the view to show. |
---|
true
if the view was shown, or false
if the view hierarchy was not
changed.
Toggles the view with the specified type. If VIEW_NONE
just hide the active
one.
typeToToggle | Type of the view to be toggled |
---|---|
showDelay | Delay time until toggle. |
true
if toggle happened, false
otherwise
Toggles the view with the specified type. If VIEW_NONE
just hide the active
one.
typeToToggle | Type of the view to be toggled. |
---|
true
if toggle happened, false
otherwise