Android: cannot convert from String to Editable

后端 未结 2 460
长发绾君心
长发绾君心 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:48

    Surely:

    Credential.getInstance().UserName.append(preferences.getString("UserName", "invalid value"));
    

    The API with the answers:

    http://developer.android.com/reference/android/text/Editable.html

提交回复
热议问题