Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created Dec 10, 2017
Embed
What would you like to do?
@Override
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)));
}
recreate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment