Some fixes

This commit is contained in:
tom79 2019-08-18 10:16:40 +02:00
parent a680cb77c1
commit ebcf84b15a
2 changed files with 7 additions and 3 deletions

View File

@ -125,6 +125,6 @@ dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
}

View File

@ -830,7 +830,9 @@ public class Status implements Parcelable{
key = key.split("\\|")[0];
SpannableStringBuilder ssb = new SpannableStringBuilder();
ssb.append(spannableStringT, 0, spannableStringT.length());
ssb.replace(startPosition,endPosition, key);
if( ssb.length() >= endPosition) {
ssb.replace(startPosition,endPosition, key);
}
spannableStringT = SpannableString.valueOf(ssb);
endPosition = startPosition + key.length();
}
@ -881,7 +883,9 @@ public class Status implements Parcelable{
key = key.split("")[0]+"";
SpannableStringBuilder ssb = new SpannableStringBuilder();
ssb.append(spannableStringT, 0, spannableStringT.length());
ssb.replace(startPosition,endPosition, key);
if( ssb.length() >= endPosition) {
ssb.replace(startPosition, endPosition, key);
}
spannableStringT = SpannableString.valueOf(ssb);
endPosition = startPosition + key.length();
}