Code example for SpannableString

Methods: removeSpansetSpansetText

0
    public void updateT(int time) {
    } 
 
    @Override 
    public void updateDisplayedExpression(String s, int cursor) {
        SpannableString content = new SpannableString(s);
        content.removeSpan(m_underlineSpan);
        content.setSpan(m_underlineSpan, cursor, cursor + 1, 0);
        m_textExpressionView.setText(content);
    } 
    //endregion 
 
    //region IKeyBoardDisplayView methods 
    @Override 
    public View getInflatedKeyboard() {
        return m_editorView;
    } 
    //endregion 
} 
Connect your IDE to all the code out there  Get Codota for Java