/// <summary> /// Clear all the input state (autotext, autocap, multitap, undo) /// from the specified Editable, going beyond Editable.clear(), which /// just clears the text but not the input state. /// </summary> /// <remarks> /// Clear all the input state (autotext, autocap, multitap, undo) /// from the specified Editable, going beyond Editable.clear(), which /// just clears the text but not the input state. /// </remarks> /// <param name="e">the buffer whose text and state are to be cleared.</param> public static void clear(android.text.Editable e) { e.clear(); e.removeSpan(ACTIVE); e.removeSpan(CAPPED); e.removeSpan(INHIBIT_REPLACEMENT); e.removeSpan(LAST_TYPED); android.text.method.QwertyKeyListener.Replaced[] repl = e.getSpans <android.text.method.QwertyKeyListener .Replaced>(0, e.Length); int count = repl.Length; { for (int i = 0; i < count; i++) { e.removeSpan(repl[i]); } } }