summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Yakovel <viktor.yakovel@sonyericsson.com>2010-02-12 16:00:41 +0100
committerJohan Redestig <johan.redestig@sonyericsson.com>2010-04-21 10:27:49 +0200
commit970a138c9730b3763171d7dc297a6372388b569f (patch)
treeb3aceba2ab0bade37583dc44ba3c04a99d75e9cb
parentef9d148ad63e79b7ea1ecad49163f33a7d37aea1 (diff)
downloadframeworks_base-970a138c9730b3763171d7dc297a6372388b569f.zip
frameworks_base-970a138c9730b3763171d7dc297a6372388b569f.tar.gz
frameworks_base-970a138c9730b3763171d7dc297a6372388b569f.tar.bz2
Text disappears when selecting text in text editor.
The problem appears when the user selects, copies and paste text and then selects text again. The second time text is selected, the copied text becomes visible in the text field. Change-Id: Iae19d1659f58ad2e1c6f1a98bdef8bbedabd447f
-rw-r--r--core/java/android/widget/TextView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 6418dad..ed2fc6b 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4549,6 +4549,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
outText.text = TextUtils.substring(content, partialStartOffset,
partialEndOffset);
}
+ } else {
+ outText.partialStartOffset = 0;
+ outText.partialEndOffset = 0;
+ outText.text = "";
}
outText.flags = 0;
if (MetaKeyKeyListener.getMetaState(mText, MetaKeyKeyListener.META_SELECTING) != 0) {