Interface TextSelectionManager.OnTextSelectionChangeListener
-
- All Implemented Interfaces:
public interface TextSelectionManager.OnTextSelectionChangeListener
Listener for text selection changes.
-
-
Method Summary
Modifier and Type Method Description abstract boolean
onBeforeTextSelectionChange(@Nullable() TextSelection newTextSelection, @Nullable() TextSelection currentTextSelection)
Called every time the text selection is about to be changed. abstract void
onAfterTextSelectionChange(@Nullable() TextSelection newTextSelection, @Nullable() TextSelection oldTextSelection)
Called once the text selection has successfully been changed. -
-
Method Detail
-
onBeforeTextSelectionChange
abstract boolean onBeforeTextSelectionChange(@Nullable() TextSelection newTextSelection, @Nullable() 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 ornull
if the active selection is going to be cleared.currentTextSelection
- The active TextSelection ornull
if there is no active selection right now.- Returns:
true
if the selection should be applied orfalse
if the current selection state should be left untouched.
-
onAfterTextSelectionChange
abstract void onAfterTextSelectionChange(@Nullable() TextSelection newTextSelection, @Nullable() TextSelection oldTextSelection)
Called once the text selection has successfully been changed.
- Parameters:
newTextSelection
- Text selection currently selected.oldTextSelection
- Text selection that was previously selected.
-
-
-
-