Return the cursor position in screen coordinates
From its beginning, InputMethodService#onUpdateCursor has provided the cursor position in local coordinates in the attached view. However, the local coordinates is not useful for IMEs to render a floating UI near the cursor because the IME is not able to know the origin of the attached view. With this CL, CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT also means that the IME will receive the cursor position in screen coordinates. Because this is a new constant in the next release, conditionally changing the coordinates never causes compatibility issues as long as its behavior is well documented. BUG: 14323360 Change-Id: I3acf2317ae1d763d11dae5ef73c2a1348b377c71
Loading
Please register or sign in to comment