PdfThumbnailGrid

Scrollable grid view of document pages.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int)

Types

Link copied to clipboard
Listener for document saving inside PdfThumbnailGrid.
Link copied to clipboard
Listener for observing a PdfThumbnailGrid page click.

Properties

Link copied to clipboard
View background color.
Link copied to clipboard
open val documentEditorSavingToolbarHandler: DocumentEditorSavingToolbarHandler
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Thumbnail Grid item label text style.

Functions

Link copied to clipboard
open fun addDrawableProvider(@NonNull drawableProvider: PdfDrawableProvider)
Adds a PdfDrawableProvider to be managed by this object.
Link copied to clipboard
Adds a listener that will be notified about document saves inside the thumbnail grid.
Link copied to clipboard
Adds a listener that will be notified when a page on the ThumbnailGrid was clicked.
Link copied to clipboard
Register a listener that would like to receive visibility change events.
Link copied to clipboard
open fun clearDocument()
Called by the activity when the view should unbind the previously set document.
Link copied to clipboard
Enters document editing mode.
Link copied to clipboard
Exits document editing mode.
Link copied to clipboard
open fun focusSearch(@NonNull focused: View, direction: Int): View
Link copied to clipboard
Returns The default NewPageDialog.Callback that is used by default by the .
Link copied to clipboard
Returns document editor to perform operations such as page manipulation, reordering and importing documents.
Link copied to clipboard
Returns the thumbnail grid background label background.
Link copied to clipboard
Returns the current type of this view.
Link copied to clipboard
Retrieves the currently selected pages of the thumbnail grid.
Link copied to clipboard
open fun hide()
Called by the activity when the view should hide itself.
Link copied to clipboard
Link copied to clipboard
Returns true if page labels are shown, false otherwise.
Link copied to clipboard
Called when the user taps / clicks on the document, not the page itself but on the side (if visible).
Link copied to clipboard
open fun onDocumentExported(@NonNull destinationUri: Uri)
Called when saving a document or exporting pages to a given destination is complete.
Link copied to clipboard
Called when document is successfully loaded and the document view has been laid out.
Link copied to clipboard
open fun onDocumentLoadFailed(@NonNull exception: Throwable)
Called if document loading has failed.
Link copied to clipboard
open fun onDocumentSave(@NonNull document: PdfDocument, @NonNull saveOptions: DocumentSaveOptions): Boolean
Called before document will be saved.
Link copied to clipboard
Called if document saving has been cancelled.
Link copied to clipboard
open fun onDocumentSaved()
Called when saving a document in place is complete.
open fun onDocumentSaved(@NonNull document: PdfDocument)
Called after the document has been saved.
Link copied to clipboard
open fun onDocumentSaveFailed(@NonNull document: PdfDocument, @NonNull exception: Throwable)
Called if document saving has failed.
Link copied to clipboard
open fun onDocumentZoomed(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, scaleFactor: Float)
Called when a user zooms a document.
Link copied to clipboard
open fun onPageChanged(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int)
Called when user scrolled to a new page.
Link copied to clipboard
open fun onPageClick(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @Nullable event: MotionEvent, @Nullable pagePosition: PointF, @Nullable clickedAnnotation: Annotation): Boolean
Called when user taps / clicks on the page.
Link copied to clipboard
open fun onPageUpdated(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int)
Called when content of page with pageIndex has changed (for example due to annotation or form field being updated).
Link copied to clipboard
open fun removeDrawableProvider(@NonNull drawableProvider: PdfDrawableProvider)
Removes a previously added PdfDrawableProvider.
Link copied to clipboard
Removes a listener from the list of registered onDocumentSaved listeners
Removes a listener from the list of registered onPageClick listeners
Link copied to clipboard
Unregister a previously registered listener that no longer wants to receive visibility change events.
Link copied to clipboard
open fun setDocument(@Nullable document: PdfDocument, @NonNull configuration: PdfConfiguration)
Called when the document has been loaded and is going to be displayed.
Link copied to clipboard
open fun setDocumentEditorEnabled(documentEditorEnabled: Boolean)
Enables/Disables document editor.
Link copied to clipboard
open fun setDocumentEditorExportEnabled(exportEnabled: Boolean)
Enables/Disables document editor "Export pages" option in action bar.
Link copied to clipboard
open fun setDocumentEditorSaveAsEnabled(saveAsEnabled: Boolean)
Enables/Disables document editor "Save As" option in action bar.
Link copied to clipboard
open fun setItemLabelBackground(@DrawableRes itemLabelBackgroundDrawableRes: Int)
Sets the thumbnail grid background label background.
Link copied to clipboard
Sets a NewPageFactory that will be used by the document editor.
Link copied to clipboard
Sets the OnPageClickListener, replacing any previously set listener.
Link copied to clipboard
open fun setShowPageLabels(showPageLabels: Boolean)
Sets whether the page labels will be shown or just the page number.
Link copied to clipboard
open fun show()
Called by the activity when the view should make itself visible.