mirror of
https://github.com/FossifyOrg/Notes.git
synced 2026-01-01 03:57:59 -05:00
add a setting for changing font size
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user