setInitialSurroundingText
Editors may use this method to provide initial input text to IMEs. As the surrounding text could be used to provide various input assistance, we recommend editors to provide the complete initial input text in its onCreateInputConnection callback. The supplied text will then be processed to serve #getInitialTextBeforeCursor
, #getInitialSelectedText
, and #getInitialTextBeforeCursor
. System is allowed to trim sourceText
for various reasons while keeping the most valuable data to IMEs.
Editor authors: Providing the initial input text helps reducing IPC calls for IMEs to provide many modern features right after the connection setup. We recommend calling this method in your implementation.
Parameters
the editor with which to set the text.
The complete input text.