由网友(红颜祸水、)分享简介:如何strore以表格的形式共享preferences数据how to strore data in shared preferences in table format 推荐答案有关商店使用低于code共享preference使用值For store the values using shared prefe...
如何strore以表格的形式共享preferences数据
how to strore data in shared preferences in table format
推荐答案
有关商店使用低于code共享preference使用值
For store the values using shared preference use below code
SharedPreferences prefs=getSharedPreferences("Key", 0);
Editor e= prefs.edit();
e.putString("Name", "AAA");
e.commit();
有关检索低于code中的共享preFS值使用
For retrieve the shared prefs value use below code
SharedPreferences prefs=getSharedPreferences("Key", 0);
String s= prefs.getString("Name", "");
相关推荐
最新文章