DocumentCoordinator

Coordinates loading and display of multiple documents in com.pspdfkit.ui.PdfActivity. Use it to modify the list of loaded documents and to switch between them.

See also

Types

Link copied to clipboard
Listener for the last document being removed from the DocumentCoordinator.
Link copied to clipboard
Listener for changes made to documents managed by DocumentCoordinator.
Link copied to clipboard
Listener for document becoming visible in the DocumentCoordinator.

Functions

Link copied to clipboard
abstract fun addDocument(@NonNull documentDescriptor: DocumentDescriptor): Boolean
Inserts a new document at the end of the documents list.
abstract fun addDocument(@NonNull documentDescriptor: DocumentDescriptor, index: Int): Boolean
Inserts a new document at the specified index.
Link copied to clipboard
Inserts a document after the current visible document.
Link copied to clipboard
Registers a OnDocumentCoordinatorEmptyListener to get notified when document gets visible in the manager.
Link copied to clipboard
Registers a OnDocumentsChangedListener to get notified when items in document coordinator change.
Link copied to clipboard
Registers a OnDocumentVisibleListener to get notified when document gets visible in the manager.
Link copied to clipboard
Returns all documents managed by this coordinator.
Link copied to clipboard
Returns currently visible document (if any).
Link copied to clipboard
abstract fun moveDocument(@NonNull documentToMove: DocumentDescriptor, targetIndex: Int): Boolean
Moves documents in the document list to specified position.
Link copied to clipboard
Removes all documents managed by this coordinator.
Link copied to clipboard
Removes all documents managed by this coordinator except for the currently visible one.
Link copied to clipboard
abstract fun removeDocument(@NonNull documentDescriptor: DocumentDescriptor): Boolean
Removes the document if it's managed by this coordinator.
Link copied to clipboard
abstract fun setDocument(@NonNull documentDescriptor: DocumentDescriptor): Boolean
Replaces currently visible document with another document.
Link copied to clipboard
Changes currently visible document.