summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-04-28 19:17:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-28 19:17:05 +0000
commit985fd3063c6b33ad3f1c9cda4d6c5c1b2d296fab (patch)
tree0388c66d577778cafa4fbb38e83b939616cbe8b7 /core/java/android/inputmethodservice/InputMethodService.java
parent10c84f010982560e13bec4af49558a3bc8be32d1 (diff)
parent4de04795f988cc7447feb9ad00e179273f75a6a3 (diff)
Merge "Return the cursor position in screen coordinates"
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index c51d1a78e5ad..ec581d1a71e1 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -255,7 +255,8 @@ public class InputMethodService extends AbstractInputMethodService {
public static final int CURSOR_ANCHOR_MONITOR_MODE_NONE = 0x0;
/**
- * The IME expects that {@link #onUpdateCursor(Rect)} is called back.
+ * The IME will receive {@link #onUpdateCursor(Rect)} called back with the current
+ * cursor rectangle in screen coordinates.
*/
public static final int CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT = 0x1;
@@ -1703,9 +1704,11 @@ public class InputMethodService extends AbstractInputMethodService {
}
/**
- * Called when the application has reported a new location of its text
- * cursor. This is only called if explicitly requested by the input method.
- * The default implementation does nothing.
+ * Called when the application has reported a new location of its text cursor. This is only
+ * called if explicitly requested by the input method. The default implementation does nothing.
+ * @param newCursor The new cursor position, in screen coordinates if the input method calls
+ * {@link #setCursorAnchorMonitorMode} with {@link #CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT}.
+ * Otherwise, this is in local coordinates.
*/
public void onUpdateCursor(Rect newCursor) {
// Intentionally empty