我已经创建了一个使用共享首选项的应用程序,以便用户登录。用户的密码保存在首选项中。我的问题是,如果用户想要更改他/她的密码,我如何更改首选项中的密码?
发布于 2011-01-28 11:08:51
SharedPreferences prefs = ... // you already know how to use prefs and have one of this objects
Editor editor = prefs.edit();
editor.putString("password", "new value");
editor.apply();
https://stackoverflow.com/questions/4824452
复制相似问题