add a setting for changing font size

This commit is contained in:
tibbi
2016-09-25 18:02:16 +02:00
parent f00c310dae
commit eea3f3dc63
12 changed files with 107 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ public class Config {
return new Config(context);
}
public Config(Context context) {
private Config(Context context) {
mPrefs = context.getSharedPreferences(Constants.PREFS_KEY, Context.MODE_PRIVATE);
}
@@ -45,4 +45,12 @@ public class Config {
public void setShouldPromptAutosave(boolean prompt) {
mPrefs.edit().putBoolean(Constants.PROMPT_AUTOSAVE, prompt).apply();
}
public int getFontSize() {
return mPrefs.getInt(Constants.FONT_SIZE, Constants.FONT_SIZE_NORMAL);
}
public void setFontSize(int size) {
mPrefs.edit().putInt(Constants.FONT_SIZE, size).apply();
}
}