Android: cannot convert from String to Editable

后端 未结 2 462
长发绾君心
长发绾君心 2021-01-21 00:14

A quick question:

I am getting the error : cannot convert from String to Editable. Here is the code :

Credential.getInstance().UserName = preferences.get         


        
2条回答
  •  深忆病人
    2021-01-21 00:42

    For anyone interested in converting a String to Editable

    Editable.Factory.getInstance().newEditable("myString");
    

    From the docs, append is

    Convenience for append(String.valueOf(text)).

提交回复
热议问题