TextSelectionPopupToolbar

Text selection implementation of the PopupToolbar. It is displayed when text is selected, providing actions like copy, highlight, strikeout, share, etc.

Use com.pspdfkit.listeners.OnPreparePopupToolbarListener.onPrepareTextSelectionPopupToolbar to customize the toolbar's menu items before it is shown.

Inheritors

Constructors

Link copied to clipboard
constructor(pdfFragment: PdfFragment)

Properties

Link copied to clipboard

Controller bound to this text selection popup toolbar (if any).

Link copied to clipboard
open override val viewId: Int

Returns the id of the content view for this toolbar.

Functions

Link copied to clipboard
fun bindController(textSelectionController: TextSelectionController)

Bind text selection controller to the toolbar. Text selection controller can be obtained via com.pspdfkit.ui.special_mode.manager.TextSelectionManager.OnTextSelectionModeChangeListener. When bound to the toolbar, the toolbar will automatically show items that are enabled or disabled, and introduce the business logic for handling each of the clicked menu item actions.

Link copied to clipboard
open override fun dismiss()

Hides/dismisses the popup toolbar.

Link copied to clipboard

Displays the text selection toolbar over the selected text. This method is no-op if called before the text controller has been set via bindController.

Link copied to clipboard

Unbinds a currently bound controller (if any).