diff options
author | Satoshi Kataoka <> | 2009-03-24 19:42:46 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 19:42:46 -0700 |
commit | df6601ac91493a7368effbe198e0181627a2cd34 (patch) | |
tree | 2fa6bf5678e23b2e0ffb43c0f1b6753e87a46184 /core/java/com | |
parent | 6eb7298019c2e59877939474e7d77e8334192a98 (diff) | |
download | frameworks_base-df6601ac91493a7368effbe198e0181627a2cd34.zip frameworks_base-df6601ac91493a7368effbe198e0181627a2cd34.tar.gz frameworks_base-df6601ac91493a7368effbe198e0181627a2cd34.tar.bz2 |
Automated import from //branches/donutburger/...@141168,141168
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/widget/EditStyledText.java | 9 |
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) { |