diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-19 10:57:31 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-19 10:57:31 -0800 |
commit | 3001a035439d8134a7d70d796376d1dfbff3cdcd (patch) | |
tree | 343ccdba15a594ff6e50c874a145232753315a30 /core/java/android/view/inputmethod/InputConnection.java | |
parent | da996f390e17e16f2dfa60e972e7ebc4f868f37e (diff) | |
download | frameworks_base-3001a035439d8134a7d70d796376d1dfbff3cdcd.zip frameworks_base-3001a035439d8134a7d70d796376d1dfbff3cdcd.tar.gz frameworks_base-3001a035439d8134a7d70d796376d1dfbff3cdcd.tar.bz2 |
auto import from //branches/cupcake/...@132276
Diffstat (limited to 'core/java/android/view/inputmethod/InputConnection.java')
-rw-r--r-- | core/java/android/view/inputmethod/InputConnection.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java index 13173f6..530127d 100644 --- a/core/java/android/view/inputmethod/InputConnection.java +++ b/core/java/android/view/inputmethod/InputConnection.java @@ -148,8 +148,14 @@ public interface InputConnection { * object to the text. {#link android.text.SpannableString} and * {#link android.text.SpannableStringBuilder} are two * implementations of the interface {#link android.text.Spanned}. - * @param newCursorPosition The new cursor position within the - * <var>text</var>. + * @param newCursorPosition The new cursor position around the text. If + * > 0, this is relative to the end of the text - 1; if <= 0, this + * is relative to the start of the text. So a value of 1 will + * always advance you to the position after the full text being + * inserted. Note that this means you can't position the cursor + * within the text, because the editor can make modifications to + * the text you are providing so it is not possible to correctly + * specify locations there. * * @return Returns true on success, false if the input connection is no longer * valid. @@ -170,8 +176,14 @@ public interface InputConnection { * automatically. * * @param text The committed text. - * @param newCursorPosition The new cursor position within the - * <var>text</var>. + * @param newCursorPosition The new cursor position around the text. If + * > 0, this is relative to the end of the text - 1; if <= 0, this + * is relative to the start of the text. So a value of 1 will + * always advance you to the position after the full text being + * inserted. Note that this means you can't position the cursor + * within the text, because the editor can make modifications to + * the text you are providing so it is not possible to correctly + * specify locations there. * * * @return Returns true on success, false if the input connection is no longer |