From 4708b66ab60a9649771d8a4a93914695580e4faa Mon Sep 17 00:00:00 2001 From: rain <2393257527@qq.com> Date: Thu, 29 May 2025 14:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/net/micode/notes/util/SpfUtil.java | 38 ------------------- .../src/net/micode/notes/util/ToastUtil.java | 15 -------- 2 files changed, 53 deletions(-) delete mode 100644 Notes-master/src/net/micode/notes/util/SpfUtil.java delete mode 100644 Notes-master/src/net/micode/notes/util/ToastUtil.java 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(); - } -}