Overlay View Provider
Base class for classes that can return a list of views that should be drawn on top of the document.
Using this API requires the current license to contain the annotations component.
This class is still in experimental state meaning that it is tested and contains no known bugs, but the API might be changed or removed with any minor release.
Types
Link copied to clipboard
interface OverlayViewProviderObserver
An observer interested in changes to the underlying set of views.
Properties
Link copied to clipboard
If returned inside getPagesWithViews ()} the overlay view provider won't be limited to certain pages.
Functions
Link copied to clipboard
open fun addOverlayViewProviderObserver(@NonNull overlayViewProviderObserver: OverlayViewProvider.OverlayViewProviderObserver)
Register a OverlayViewProviderObserver to be notified of changes of provided views.
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
By overriding this method subclasses can define a set of page numbers for which views are available.
Link copied to clipboard
abstract fun getViewsForPage(@NonNull context: Context, @NonNull document: PdfDocument, @IntRange(from = 0 ) pageIndex: Int): List<View>
Returns all views for the given
document
and pageIndex
.Link copied to clipboard
Notifies all registered OverlayViewProviderObserver instances that the views have changed and need to be removed and added again.
Notifies all registered OverlayViewProviderObserver instances that the views for the given
pageIndex
have changed and need to be removed and added again.Link copied to clipboard
Called when views that have been previously returned by getViewsForPage have become hidden because the hosting page has become hidden.
Link copied to clipboard
Called when views that have been previously returned by getViewsForPage have been recycled because their hosting page was recycled.
Link copied to clipboard
Called when views that have been previously returned by getViewsForPage have become visible because the hosting page has become visible.
Link copied to clipboard
open fun removeOverlayViewProviderObserver(@NonNull overlayViewProviderObserver: OverlayViewProvider.OverlayViewProviderObserver)
Unregister a previously registered OverlayViewProviderObserver so it won't receive any future changes of provided views.