summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gilles Debunne <debunne@google.com> 2011-02-17 17:04:46 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-02-17 17:04:46 -0800
commite1590884f2e54848bac2e80ee1754be9b7e6e48d (patch)
tree5e301aa6beadeafa528ddf39bb92309286c0fb4d
parent33bfb66fe2850366bcef2a35a13ba6ffc48a580b (diff)
parent46b7d441c6efa456ad95471d1d06946ea5637232 (diff)
Merge "Composing span is removed when insertion point is moved"
-rw-r--r--core/java/android/widget/TextView.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 993af31c31cd..d90d5bed8dc6 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4403,12 +4403,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
(mCurrentAlpha * Color.alpha(cursorcolor)) / 255);
}
mHighlightPaint.setStyle(Paint.Style.STROKE);
-
- if (mCursorCount > 0) {
- drawCursor = true;
- } else {
- highlight = mHighlightPath;
- }
+ highlight = mHighlightPath;
+ drawCursor = true;
}
} else {
if (mHighlightPathBogus) {
@@ -4491,7 +4487,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mCorrectionHighlighter.draw(canvas, cursorOffsetVertical);
}
- if (drawCursor) drawCursor(canvas, cursorOffsetVertical);
+ if (drawCursor) {
+ drawCursor(canvas, cursorOffsetVertical);
+ // Rely on the drawable entirely, do not draw the cursor line.
+ // Has to be done after the IMM related code above which relies on the highlight.
+ highlight = null;
+ }
layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);