Home | History | Annotate | Download | only in shadows

Lines Matching refs:editor

24   private SharedPreferences.Editor editor;
39 editor = sharedPreferences.edit();
40 editor.putBoolean("boolean", true);
41 editor.putFloat("float", 1.1f);
42 editor.putInt("int", 2);
43 editor.putLong("long", 3L);
44 editor.putString("string", "foobar");
49 editor.putStringSet("stringSet", stringSet);
54 editor.commit();
67 editor.commit();
68 editor.remove("string").commit();
75 editor.commit();
81 editor.commit();
88 editor.putString("deleteMe", "foo").commit();
90 editor.remove("deleteMe");
92 editor.putString("dontDeleteMe", "baz");
93 editor.remove("dontDeleteMe");
95 editor.commit();
110 editor.putString("deleteMe", "foo");
112 editor.clear();
113 editor.putString("dontDeleteMe", "baz");
115 editor.commit();
124 // Android always calls clear before put on any open editor, so here "foo" is preserved rather than cleared.
131 editor.putString("deleteMe", "foo");
133 editor.putString("deleteMe", null);
134 editor.commit();
141 editor.putStringSet("deleteMe", new HashSet<String>());
143 editor.putStringSet("deleteMe", null);
144 editor.commit();
151 editor.apply();