mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Clear composing background
This commit is contained in:
parent
e6f3560305
commit
d2084746b9
1 changed files with 5 additions and 1 deletions
|
@ -21,6 +21,7 @@ import static android.text.Html.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE;
|
|||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.Layout;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextDirectionHeuristics;
|
||||
|
@ -43,6 +44,7 @@ import android.text.style.SuperscriptSpan;
|
|||
import android.text.style.TypefaceSpan;
|
||||
import android.text.style.URLSpan;
|
||||
import android.text.style.UnderlineSpan;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
|
@ -76,8 +78,10 @@ public class HtmlEx {
|
|||
* @return string containing input converted to HTML
|
||||
*/
|
||||
public /* static */ String toHtml(Spanned text, int option) {
|
||||
if (!Helper.isUiThread())
|
||||
if (!Helper.isUiThread()) {
|
||||
text = new SpannableStringBuilderEx(text);
|
||||
BaseInputConnection.removeComposingSpans((Spannable) text);
|
||||
}
|
||||
StringBuilder out = new StringBuilder();
|
||||
withinHtml(out, text, option);
|
||||
return out.toString();
|
||||
|
|
Loading…
Reference in a new issue