@@ -135,11 +135,14 @@ public final class SpanUtils {
135135 private final int mTypeImage = 1 ;
136136 private final int mTypeSpace = 2 ;
137137
138+ private CharSequence fontSizeTagCS = "[SpanUtils]" ;
139+
138140
139141 public SpanUtils () {
140142 mBuilder = new SpannableStringBuilder ();
141143 mText = "" ;
142144 setDefault ();
145+ append (fontSizeTagCS );
143146 }
144147
145148 private void setDefault () {
@@ -178,6 +181,17 @@ private void setDefault() {
178181 spaceSize = -1 ;
179182 }
180183
184+ /**
185+ * The character used to get the font size (span start with image)
186+ *
187+ * @param fontSizeTagCS The character
188+ * @return the single {@link SpanUtils} instance
189+ */
190+ public SpanUtils setFontSizeTagCS (CharSequence fontSizeTagCS ) {
191+ this .fontSizeTagCS = fontSizeTagCS ;
192+ return this ;
193+ }
194+
181195 /**
182196 * Set the span of flag.
183197 *
@@ -709,7 +723,6 @@ public SpanUtils appendImage(@DrawableRes final int resourceId) {
709723 * @return the single {@link SpanUtils} instance
710724 */
711725 public SpanUtils appendImage (@ DrawableRes final int resourceId , @ Align final int align ) {
712- append (Character .toString ((char ) 0 ));// it's important for span start with image
713726 apply (mTypeImage );
714727 this .imageResourceId = resourceId ;
715728 this .alignImage = align ;
@@ -752,7 +765,7 @@ private void apply(final int type) {
752765 */
753766 public SpannableStringBuilder create () {
754767 applyLast ();
755- return mBuilder ;
768+ return mBuilder . delete ( 0 , fontSizeTagCS . length ()) ;
756769 }
757770
758771 private void applyLast () {
0 commit comments