diff options
| author | 2022-12-01 15:53:13 -0800 | |
|---|---|---|
| committer | 2023-01-11 21:48:43 -0800 | |
| commit | c3d7b4e7511cabe162ba8c4faf72f287ed7b44b9 (patch) | |
| tree | 7176c8f5f18f4d93d06657ec2ef6f220251136cd /libs/input/PointerController.cpp | |
| parent | f31bd18fe90bee9ee236ebb18274e87c64970a70 (diff) | |
Introduce OffsetMapping for TextView TransformationMethod
This CL supports OffsetMapping internally for the TextView's
TransformationMethod. It make it possible for TransformationMethod to
alter the original text's length. It'll be mainly used for the insertion
mode feature requested by stylus handwriting.
This CL checked all index access to Layout from Editor, TextView and
MovementMethod. And make sure they are aware of the text transformation.
When there isn't a TransformationMethod or the TransformationMethod
returns a text that's not an instance of OffsetMapping, the existing
behavior is not impacted.
The following classes will support a transformed text with OffsetMapping:
- InsertionPointCursorController, SelectionModifierCursorController
- InsertionHandleView, SelectionHandleView, HandleView
- PinnedPopupWindow, EasyEditPopupWindow, SuggestionsPopupWindow
- SelectionActionModeHelper
The following parts don't support OffsetMapping, but instead will
direclty return false/null or become no-op when OffsetMapping is used:
- CursorAnchorInfoNotifier, CursorAnchorInfo
- TextBoundsInfo
- TextView HandwritingGesture
- Selection move methods
- LinkMovementMethod
- BaseKeyListener
Bug: 242089987
Test: atest DynamicLayoutTransformedTextTest
Test: manually test
Change-Id: I2ad2c2148353e69214efd9aae04a69a6367d0981
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions