public static interface

TextSelectionManager.OnTextSelectionChangeListener

com.pspdfkit.ui.special_mode.manager.TextSelectionManager.OnTextSelectionChangeListener

Class Overview

Listener for text selection changes.

Summary

Public Methods
abstract void onAfterTextSelectionChange(TextSelection newTextSelection, TextSelection oldTextSelection)
Called once the text selection has successfully been changed.
abstract boolean onBeforeTextSelectionChange(TextSelection newTextSelection, TextSelection currentTextSelection)
Called every time the text selection is about to be changed.

Public Methods

public abstract void onAfterTextSelectionChange (TextSelection newTextSelection, TextSelection oldTextSelection)

Called once the text selection has successfully been changed.

Parameters
newTextSelection Text selection currently selected.
oldTextSelection Text selection that was previously selected.

public abstract boolean onBeforeTextSelectionChange (TextSelection newTextSelection, TextSelection currentTextSelection)

Called every time the text selection is about to be changed. It is called before the current text selection is changed, given the listener the possibility to prevent selection, deselection or alteration of selection.

Parameters
newTextSelection TextSelection that is going to be selected or null if the active selection is going to be cleared.
currentTextSelection The active TextSelection or null if there is no active selection right now.
Returns
  • true if the selection should be applied or false if the current selection state should be left untouched.