Android How can I Convert a String to a Editable

前端 未结 2 711
感动是毒
感动是毒 2020-12-14 16:10

We all know we can setText(String) to an editText box but if you want to get an editable variable from a string variable how do you do this?

For Temp I made an invis

2条回答
  •  庸人自扰
    2020-12-14 16:37

    Use Editable.Factory.getInstance().newEditable(str) From the android documentation:

    Returns a new SpannedStringBuilder from the specified CharSequence. You can override this to provide a different kind of Spanned.

提交回复
热议问题