Java tutorial
//package com.java2s; //License from project: Apache License import android.text.Spannable; import android.text.style.CharacterStyle; public class Main { /** * Remove all spans. */ public static void removeSpans(Spannable spannable) { Object spansToRemove[] = spannable.getSpans(0, spannable.length(), Object.class); for (Object span : spansToRemove) { if (span instanceof CharacterStyle) { spannable.removeSpan(span); } } } }