-
-
Save jezinka/e47c06d7e690b9fefc1ff06117f0b5fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int getTimeDeltaMilliseconds(Context context) { | |
return 1000 * 60 * 60 * 24 * getDaysInPlanner(context); | |
} | |
public static int getDaysInPlanner(Context context) { | |
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context); | |
String daysNoPrefs = sharedPref.getString(SettingsActivity.PREFS_DAYS_NO, "7"); | |
return Integer.parseInt(daysNoPrefs); | |
} | |
private static int getFirstDay(Context context) { | |
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context); | |
String firstDayPrefs = sharedPref.getString(SettingsActivity.PREFS_FIRST_DAY, "7"); | |
return Integer.parseInt(firstDayPrefs); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment