RTEditor/src/main/java/com/onegravity/rteditor/ClonedSpannableString.java
@Override
    public void setSpan(Object what, int start, int end, int flags) {
        if (mSpanCount + 1 >= mSpans.length) {
            int newsize = mSpanCount + 10;
            Object[] newtags = new Object[newsize];
            int[] newdata = new int[newsize * 3];

            System.arraycopy(mSpans, 0, newtags, 0, mSpanCount);
            System.arraycopy(mSpanData, 0, newdata, 0, mSpanCount * 3);

            mSpans = newtags;
            mSpanData = newdata;
        }

        mSpans[mSpanCount] = what;
        mSpanData[mSpanCount * COLUMNS + START] = start;
        mSpanData[mSpanCount * COLUMNS + END] = end;
        mSpanData[mSpanCount * COLUMNS + FLAGS] = flags;
        mSpanCount++;
    }
@Override
    public void setSpan(Object what, int start, int end, int flags) {
        if (mSpanCount + 1 >= mSpans.length) {
            int newsize = mSpanCount + 10;
            Object[] newtags = new Object[newsize];
            int[] newdata = new int[newsize * 3];

            System.arraycopy(mSpans, 0, newtags, 0, mSpanCount);
            System.arraycopy(mSpanData, 0, newdata, 0, mSpanCount * 3);

            mSpans = newtags;
            mSpanData = newdata;
        }

        mSpans[mSpanCount] = what;
        mSpanData[mSpanCount * COLUMNS + START] = start;
        mSpanData[mSpanCount * COLUMNS + END] = end;
        mSpanData[mSpanCount * COLUMNS + FLAGS] = flags;
        mSpanCount++;
    }
@ Override public void setSpan ( Object what , int start , int end , int flags ) { if ( mSpanCount + 1 >= mSpans . length ) { int newsize = mSpanCount + 10 ; Object [ ] newtags = new Object [ newsize ] ; int [ ] newdata = new int [ newsize * 3 ] ; System . arraycopy ( mSpans , 0 , newtags , 0 , mSpanCount ) ; System . arraycopy ( mSpanData , 0 , newdata , 0 , mSpanCount * 3 ) ; mSpans = newtags ; mSpanData = newdata ; } mSpans [ mSpanCount ] = what ; mSpanData [ mSpanCount * COLUMNS + START ] = start ; mSpanData [ mSpanCount * COLUMNS + END ] = end ; mSpanData [ mSpanCount * COLUMNS + FLAGS ] = flags ; mSpanCount ++ ; }
****************************************** SpannableString Methods *******************************************
****************************************** SpannableString Methods *******************************************