| java.lang.Object | ||
| ↳ | com.pspdfkit.ui.PopupToolbar | |
| ↳ | com.pspdfkit.ui.toolbar.popup.PdfTextSelectionPopupToolbar | |
Text selection implementation of the PopupToolbar. It will show right above the selected
text if the toolbar has been successfully bound with a respective TextSelectionController.
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pspdfkit.ui.PopupToolbar
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
PdfTextSelectionPopupToolbar(PdfFragment pdfFragment)
Creates a new text selection popup toolbar that will be displayed in the specified fragment.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
bindController(TextSelectionController textSelectionController)
Bind text selection controller to the toolbar.
| ||||||||||
| void |
dismiss()
Hides/dismisses the popup toolbar.
| ||||||||||
| TextSelectionController |
getController()
Gets the text selection controller that is currently set on the toolbar (if any).
| ||||||||||
| int |
getViewId()
Returns the id of the content view for this toolbar.
| ||||||||||
| boolean |
onItemClicked(PopupToolbarMenuItem popupToolbarMenuItem)
Called when the menu item has been clicked.
| ||||||||||
| void |
showForSelectedText()
Displays the text selection toolbar over the selected text.
| ||||||||||
| void |
unbindController()
Unbinds a currently bound controller (if any).
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pspdfkit.ui.PopupToolbar
| |||||||||||
From class
java.lang.Object
| |||||||||||
Creates a new text selection popup toolbar that will be displayed in the specified fragment.
| pdfFragment | Fragment on which the toolbar will be displayed. |
|---|
Bind text selection controller to the toolbar. Text selection controller can be obtained
via 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.
| textSelectionController | Controller to be bound to the toolbar. |
|---|
Hides/dismisses the popup toolbar.
Gets the text selection controller that is currently set on the toolbar (if any).
null if it doesn't exist.
Returns the id of the content view for this toolbar.
Called when the menu item has been clicked. When overriding this method, make sure you call
`super()` so that the PopupToolbar.OnPopupToolbarItemClickedListener is invoked correctly.
| popupToolbarMenuItem | Item that was clicked. |
|---|
true to interrupt the callback, false to let it go through
and allow the default menu item click handling.
Displays the text selection toolbar over the selected text. This method is no-op
if called before the text controller had been set via bindController(TextSelectionController).
Unbinds a currently bound controller (if any).