diff --git a/Notes-master/src/net/micode/notes/util/SpfUtil.java b/Notes-master/src/net/micode/notes/util/SpfUtil.java deleted file mode 100644 index 153381e..0000000 --- a/Notes-master/src/net/micode/notes/util/SpfUtil.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.micode.notes.util; - -import android.content.Context; -import android.content.SharedPreferences; - -public class SpfUtil { - - private static String SPF_NAME = "noteSpf"; - - public static void saveString(Context context, String key, String value) { - SharedPreferences spf = context.getSharedPreferences(SPF_NAME, Context.MODE_PRIVATE); - SharedPreferences.Editor edit = spf.edit(); - edit.putString(key, value); - edit.apply(); - } - - public static String getString(Context context, String key) { - SharedPreferences spf = context.getSharedPreferences(SPF_NAME, Context.MODE_PRIVATE); - return spf.getString(key, ""); - } - - public static void saveInt(Context context, String key, int value) { - SharedPreferences spf = context.getSharedPreferences(SPF_NAME, Context.MODE_PRIVATE); - SharedPreferences.Editor edit = spf.edit(); - edit.putInt(key, value); - edit.apply(); - } - - public static int getInt(Context context, String key) { - SharedPreferences spf = context.getSharedPreferences(SPF_NAME, Context.MODE_PRIVATE); - return spf.getInt(key, -1); - } - - public static int getIntWithDefault(Context context, String key, int defValue) { - SharedPreferences spf = context.getSharedPreferences(SPF_NAME, Context.MODE_PRIVATE); - return spf.getInt(key, defValue); - } -} diff --git a/Notes-master/src/net/micode/notes/util/ToastUtil.java b/Notes-master/src/net/micode/notes/util/ToastUtil.java deleted file mode 100644 index b1894f7..0000000 --- a/Notes-master/src/net/micode/notes/util/ToastUtil.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.micode.notes.util; - -import android.content.Context; -import android.widget.Toast; - -public class ToastUtil { - - public static void toastShort(Context context, String msg) { - Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); - } - - public static void toastLong(Context context, String msg) { - Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); - } -}