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 -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -