题目内容
下面一段代码是使用SharedPreferences技术,将用户账号和密码保存到data.xml文件中,请阅读并补全缺失的代码。public boolean saveUserInfo(Context context, String account, String password) { SharedPreferences sp = ______ ("data", Context.MODE_PRIVATE); SharedPreferences.Editor edit = ______ ; //3.设置值 edit.putString("userName", account); edit.putString("pwd", password); ______ ; ______ ;}
查看答案
搜索结果不匹配?点我反馈