DefaultBookmarkAdapter

Default implementation of BookmarkViewAdapter which handles bookmark behaviour for the default BookmarkListView.

Note: This adapter is bound to a single PdfFragment instance. If you are using this manually in your custom activity, replace the fragment (for example when reloading documents), create and set a new adapter for the new fragment.

Constructors

Link copied to clipboard
constructor(@NonNull fragment: PdfFragment)
Creates a new adapter bound to the passed fragment.

Functions

Link copied to clipboard
Adds this view to bookmark change events via BookmarkListener interface.
Link copied to clipboard
Called to retrieve the list of bookmarks to display.
Link copied to clipboard
Called to determine bookmark add button enabled state.
Link copied to clipboard
open fun onBookmarkAdd()
Called when add button has been clicked in this view.
Link copied to clipboard
open fun onBookmarkAdded(@NonNull bookmark: Bookmark)
Called when a new bookmark was added.
Link copied to clipboard
open fun onBookmarkClicked(@NonNull bookmark: Bookmark)
Called when user taps on a bookmark outside editing mode.
Link copied to clipboard
open fun onBookmarkNameSet(@NonNull bookmark: Bookmark, @Nullable name: String)
Called when bookmark should be renamed.
Link copied to clipboard
open fun onBookmarkPositionSet(@NonNull bookmark: Bookmark, position: Int)
Called when bookmark has been reordered in this view.
Link copied to clipboard
open fun onBookmarkRemove(@NonNull bookmark: Bookmark): Boolean
Called when user deleted the bookmark from list.
Link copied to clipboard
open fun onBookmarksChanged(@NonNull bookmarks: List<Bookmark>)
Called when bookmark list has been changed in some way.
Link copied to clipboard
open fun onDestroy(@NonNull owner: LifecycleOwner)
Called when the lifecycle owner (the fragment) is destroyed.
Link copied to clipboard
Called when document is successfully loaded and the document view has been laid out.
Link copied to clipboard
open fun onStart(@NonNull owner: LifecycleOwner)
Called when the lifecycle owner (the fragment) moves to the started state.
Link copied to clipboard
open fun onStop(@NonNull owner: LifecycleOwner)
Called when the lifecycle owner (the fragment) moves to the stopped state.
Link copied to clipboard
Removes this view from bookmark change events via BookmarkListener interface.