Skip to content

Instantly share code, notes, and snippets.

Created Dec 10, 2017
What would you like to do?
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals("plan_length")) {
planLength = Integer.parseInt(sharedPreferences.getString(key, getString(R.string.plan_length_default_value)));
} else if (key.equals("first_day")) {
firstDayOfWeek = Integer.parseInt(sharedPreferences.getString(key, getString(R.string.first_day_default_value)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment