1.首先获取一个SharedPreferences的一个对象
2.由该对象调用edit()方法获取一个Editor对象
3.然后添加值(利用putString/putBoolean等方法)editor.putString( )
4.提交editor.commit()
封装:
基本用法:
1.首先获取一个SharedPreferences的一个对象
2.由该对象调用edit()方法获取一个Editor对象
3.然后添加值(利用putString/putBoolean等方法)editor.putString( )
4.提交editor.commit()
封装:
基本用法: