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

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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -