jpkhawam / Nabu

Offline Android note taking app. Aimed to be modern-looking and capable, with a UI inspired by Google Keep's.
GNU General Public License v2.0
24 stars 7 forks source link

Font Size Setting Function Improvement For SettingsActivity and Navigation Drawer #36

Closed ThungYongHan closed 2 years ago

ThungYongHan commented 2 years ago

Addition of theme resources with android:textSize items and 17sp(Medium) and 19sp(Large) attributes to be used for SettingsActivity.

Addition of style resources with itemTextAppearance items and ?textAppearanceTitleSmall, ?textAppearanceTitleMedium, and ?textAppearanceTitleLarge attributes to be used for NavigationView.

SharedPreferences "settings_fontsize" string value is checked to determine the selected font size setting and getTheme().applyStyle() is used for the SettingsActivity font size changes while setItemTextAppearance() is used for the programmatic setting of itemTextAppearance for NavigationView.

Navigation drawer font size change is reflected in every activity that can access the navigation drawer.

SettingsActivity (Small Font Size Selected): 1

SettingsActivity (Medium Font Size Selected): 2

SettingsActivity (Large Font Size Selected): 3

Navigation Drawer (Small Font Size Selected): 4

Navigation Drawer (Medium Font Size Selected): 5

Navigation Drawer (Large Font Size Selected): 6

ThungYongHan commented 2 years ago

Thank you for the praise! 😊