summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSatoshi Kataoka <>2009-03-24 19:42:28 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 19:42:28 -0700
commit1ab415f6e9d064628deb3158eeb815589eb8ce3b (patch)
treebedcbf4f2c2da2f06acef5103b091a8bec71be07 /core
parente1e5df58b2b8c733441c6dca8c96b35a39f9a349 (diff)
downloadframeworks_base-1ab415f6e9d064628deb3158eeb815589eb8ce3b.zip
frameworks_base-1ab415f6e9d064628deb3158eeb815589eb8ce3b.tar.gz
frameworks_base-1ab415f6e9d064628deb3158eeb815589eb8ce3b.tar.bz2
Automated import from //branches/master/...@141169,141169
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/widget/EditStyledText.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/com/android/internal/widget/EditStyledText.java b/core/java/com/android/internal/widget/EditStyledText.java
index 3da9753..b36707e 100644
--- a/core/java/com/android/internal/widget/EditStyledText.java
+++ b/core/java/com/android/internal/widget/EditStyledText.java
@@ -933,8 +933,13 @@ public class EditStyledText extends EditText {
Log.d(LOG_TAG, "--- setStyledTextSpan:" + mMode + ","
+ start + "," + end);
}
- mEST.getText().setSpan(span, start, end,
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ if (start < end) {
+ mEST.getText().setSpan(span, start, end,
+ Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ } else {
+ mEST.getText().setSpan(span, end, start,
+ Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
}
private void changeSizeSelectedText(int size) {