Code example for SharedPreferences

Methods: editgetAll

0
		Map<String,?> mMap;
		Editor mEditor;
 
		public PreferencesAccessor(SharedPreferences p) {
			mPrefs = p;
			mMap = p.getAll();
		} 
		 
		public void beginEdit() { 
			mEditor = mPrefs.edit();
			mEditor.clear();
		} 
 
		public void endEdit() { 
			mEditor.commit();
			mEditor = null;
		} 
 
		@Override 
		public Set<String> keySet() {
			return mMap.keySet();