PdfDrawableProvider

Interface for a class that can return a list of PdfDrawable instances that should be drawn on top of the document.

See also

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
An observer interested in changes to the underlying set of drawables.

Properties

Link copied to clipboard
If returned inside getFilteredPages the drawable provider won't be limited to a certain set of pages.

Functions

Link copied to clipboard
abstract fun getDrawablesForPage(@NonNull context: Context, @NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int): List<out PdfDrawable>
Returns all drawables for the given document and pageIndex.
Link copied to clipboard
open fun getDrawablesForPageAsync(@NonNull context: Context, @NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int): Observable<out PdfDrawable>
Returns an observable for fetching all page drawables in an asynchronous manner.
Link copied to clipboard
By overriding this method subclasses can define a set of page numbers for which drawables are available.
Link copied to clipboard
Notifies all registered DrawableProviderObserver instances that the drawables have changed and need to be reloaded and redrawn.
open fun notifyDrawablesChanged(@IntRange(from = 0) pageIndex: Int)
Notifies all registered DrawableProviderObserver instances that the drawables for the given pageIndex have changed and need to be reloaded and redrawn.
Link copied to clipboard
Register a DrawableProviderObserver to be notified of changes of provided drawables.
Link copied to clipboard
Unregister a previously registered DrawableProviderObserver so it won't receive any future changes of provided drawables.