添加默认收藏设置
This commit is contained in:
1 parent
bcba2f556b
commit
9aecbf9e66
14 files changed
+282
-33
No files matched your search
@@ -59,6 +59,9 @@ public class Config {
|
||||
private static final String KEY_THEME_COLOR = "theme_color";
|
||||
private static final int DEFAULT_THEME_COLOR = 0xff0099cc;
|
||||
|
||||
private static final String KEY_DEFAULT_FAVORITE = "default_favorite";
|
||||
private static final String DEFAULT_DEFAULT_FAVORITE = "-2";
|
||||
|
||||
private static boolean mInit = false;
|
||||
|
||||
private static Context mContext;
|
||||
@@ -278,4 +281,12 @@ public class Config {
|
||||
public static void setThemeColor(int themeColor) {
|
||||
mConfigPre.edit().putInt(KEY_THEME_COLOR, themeColor).apply();
|
||||
}
|
||||
|
||||
public static int getDefaultFavorite() {
|
||||
return Integer.parseInt(mConfigPre.getString(KEY_DEFAULT_FAVORITE, DEFAULT_DEFAULT_FAVORITE));
|
||||
}
|
||||
|
||||
public static void setDefaultFavorite(int defaultFavorite) {
|
||||
mConfigPre.edit().putString(KEY_DEFAULT_FAVORITE, String.valueOf(defaultFavorite)).apply();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user