diff options
author | Amith Yamasani <yamasani@google.com> | 2010-08-25 18:27:20 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2010-08-26 14:53:39 -0700 |
commit | a90b7f0125389b9e1040d2be82aad4ef74ea6071 (patch) | |
tree | df71583ddfca7e822c1a964937bc966af5d3e4b9 /packages | |
parent | 846eb30f78a9153102c743c2c1b49de1a4079fb1 (diff) | |
download | frameworks_base-a90b7f0125389b9e1040d2be82aad4ef74ea6071.zip frameworks_base-a90b7f0125389b9e1040d2be82aad4ef74ea6071.tar.gz frameworks_base-a90b7f0125389b9e1040d2be82aad4ef74ea6071.tar.bz2 |
Add methods to InputConnection: setComposingRegion() to select a region of text for correction, and getSelectedText()
to return the selected text.
setComposingRegion:
The TextView may choose to highlight the text in some way (underline for now) to indicate
that the text is selected for correction, if the IME wants to provider alternatives.
Choosing an alternative in the IME can then call IC.commitText() to replace the highlighted
(not selected) text with a different candidate.
This change also ensures that any existing spans/styles are not wiped out. So we can now
correct rich text as well.
getSelectedText:
This is a convenience to get the selected text instead of using extracted text that is
more heavy weight. Existing getTextBeforeCursor() and getTextAfterCursor() fail to
retrieve the selected text, only what's before and after the selection.
Change-Id: Ieb5ecd5ff947ea04958589f501e7bd5228e00fb5
Diffstat (limited to 'packages')
0 files changed, 0 insertions, 0 deletions