PopupToolbar

open class PopupToolbar

A class used for displaying a toolbar as a popup. It's a remake of a default Android text selection toolbar, where the items are displayed horizontally, with overflow button if there are items that don't fit the screen. Then once the overflow button is pressed, the toolbar displays other items vertically, with back button on the bottom to return to the main items.

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull pdfFragment: PdfFragment)
Creates a popup toolbar on the given PdfFragment.

Types

Link copied to clipboard
Listener for menu item clicks.

Functions

Link copied to clipboard
open fun dismiss()
Hides/dismisses the popup toolbar.
Link copied to clipboard
Gets menu items currently displayed in this popup toolbar.
Link copied to clipboard
open fun getViewId(): Int
Returns the id of the content view for this toolbar.
Link copied to clipboard
open fun isShowing(): Boolean
Gets whether the popup toolbar is currently showing or not.
Link copied to clipboard
open fun onItemClicked(@NonNull popupToolbarMenuItem: PopupToolbarMenuItem): Boolean
Called when the menu item has been clicked.
Link copied to clipboard
open fun setMenuItems(@NonNull popupToolbarMenuItems: List<PopupToolbarMenuItem>)
Sets menu items to be displayed in this popup toolbar.
Link copied to clipboard
Sets the listener for popup toolbar menu item clicks.
Link copied to clipboard
open fun show(pageIndex: Int, x: Float, y: Float)
Show the popup toolbar at the specified page index with possible X and Y offsets.
Link copied to clipboard
open fun showAgain()
Show the popup toolbar with the parameters that were last used when calling show.