Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f5456d5 authored by Narinder Rana's avatar Narinder Rana
Browse files

removeSpan on afterTextChanged

parent a3a0de0f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ import android.text.Spannable;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.CharacterStyle;
import android.text.style.MetricAffectingSpan;
import android.text.style.TtsSpan;
import android.util.AttributeSet;
import android.util.Log;
@@ -344,6 +346,14 @@ public class TextFieldsEditorView extends LabeledEditorView {
                        mFixedPhonetic = getPhonetic(column);
                        mFixedDisplayName = displayNameField;
                    }

                    CharacterStyle[] toBeRemovedSpans = s.getSpans(0, s.length(),
                            MetricAffectingSpan.class);
                    for (int index = 0; index < toBeRemovedSpans.length; index++)
                        s.removeSpan(toBeRemovedSpans[index]);

                    Log.e("TAG", "line 356 ....afterTextChanged...................removeSpan");

                }

                @Override