android - Setting underline span in edittext without removing autosuggest -
i didn't expect problem cant underline words in edittext because of underline in softkeyboard's autosuggest feature automatically underlines selected word .however still want keep feature while applying underlines.
in edittext:
by default selected word automatically underlined when space clicked underline removed when apply underline span via button hit space gets removed.
applying underlinespan:-
spannablestring word = new spannablestring(noteview.gettext()); word.setspan((new underlinespan()), 0, word.length(), 0); edittext.settext(word);
this code works fine if word isn't selected tried changing selection before spanning still didn't workout.is there maybe workaround remove auto-suggest underline?.
Comments
Post a Comment