Interface PSPDFKitViews.PSPDFView
-
- All Implemented Interfaces:
public interface PSPDFKitViews.PSPDFView
Shared interface of all auxiliary views (search view, thumbnail bar, grid, etc.) that are hosted inside the PdfActivity.
-
-
Method Summary
Modifier and Type Method Description abstract void
setDocument(@NonNull() PdfDocument document, @NonNull() PdfConfiguration configuration)
Called when the document
has been loaded and is going to be displayed.abstract void
addOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Register a listener
that would like to receive visibility change events.abstract void
removeOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Unregister a previously registered listener
that no longer wants to receive visibility change events.abstract void
show()
Called by the activity when the view should make itself visible. abstract void
hide()
Called by the activity when the view should hide itself. abstract void
clearDocument()
Called by the activity when the view should unbind the previously set document. abstract boolean
isDisplayed()
Called when the activity needs to know the visibility of this view. abstract PSPDFKitViews.Type
getPSPDFViewType()
Returns the current type of this view. -
-
Method Detail
-
setDocument
@UiThread() abstract void setDocument(@NonNull() PdfDocument document, @NonNull() PdfConfiguration configuration)
Called when the
document
has been loaded and is going to be displayed. This has to be called on the main thread.- Parameters:
document
- Loaded PdfDocument.configuration
- Containing document and presentation settings.
-
addOnVisibilityChangedListener
abstract void addOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Register a
listener
that would like to receive visibility change events. Whenever the visibility of a managed PSPDFView changes, all registered listeners will be notified.- Parameters:
listener
- Listener to be added.
-
removeOnVisibilityChangedListener
abstract void removeOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Unregister a previously registered
listener
that no longer wants to receive visibility change events.- Parameters:
listener
- Listener to be removed.
-
show
abstract void show()
Called by the activity when the view should make itself visible.
-
hide
abstract void hide()
Called by the activity when the view should hide itself.
-
clearDocument
abstract void clearDocument()
Called by the activity when the view should unbind the previously set document. This may be called in low-memory situations or prior to re-binding another document.
-
isDisplayed
abstract boolean isDisplayed()
Called when the activity needs to know the visibility of this view. Returns
true
if this view is visible, otherwise returnsfalse
.
-
getPSPDFViewType
@NonNull() abstract PSPDFKitViews.Type getPSPDFViewType()
Returns the current type of this view.
- Returns:
Any of Type.
-
-
-
-