Android移动应用开发教程 课件 第6章 数据存储与内容提供者.pptx

Android移动应用开发教程 课件 第6章 数据存储与内容提供者.pptx

共享参数;目录;01;使用XML文件存储key-value键值对数据,通常用来存储一些简单的配置信息,其存储位置在/data/data/包名/shared_prefs目录下,并且所保存的数据在应用程序结束后依然保存。;02;存储数据到SharedPreferences中,需要使用SharedPreferences.Editor对象:

SharedPreferences.Editoreditor=preferences.edit();

然后再利用SharedPreferences.Editor对象的putInt()、putBoolean()、putFloat()、putLong()、put

文档评论(0)

1亿VIP精品文档

相关文档