| | |
| | | } |
| | | |
| | | |
| | | public static void saveOnLining(Context context, boolean content) { |
| | | saveConfig("onLining", content+"", context); |
| | | } |
| | | |
| | | |
| | | public static boolean isOnLining(Context context) { |
| | | String onLine= getConfig("onLining", context); |
| | | if(StringUtils.isEmpty(onLine)){ |
| | | return false; |
| | | } |
| | | return Boolean.parseBoolean(onLine); |
| | | } |
| | | |
| | | |
| | | private static void saveConfig(String key, String value, Context context) { |
| | | SharedPreferences.Editor editor = context.getSharedPreferences("config", Context.MODE_PRIVATE).edit(); |
| | | editor.putString(key, value); |