๐จ Contrast / Theme Settings
Users can choose between Light, Dark, or System Default themes.
This improves accessibility, especially for visually impaired users or those with light sensitivity.
๐งโ๐ป Available Options
- Default โ Follows system settings
- Black on White โ Light theme
- White on Black โ Dark theme
โ How It Works
- The settings screen includes a group of radio buttons for theme selection.
- When a user selects a theme, the app applies it using:
```kotlin AppCompatDelegate.setDefaultNightMode(MODE) ````
- The app then restarts to apply the theme using
requireActivity().recreate()
or equivalent.
๐ Persistence
- The selected mode is saved in
SharedPreferences
under the key:
text
app_contrast_mode
- Available values:
kotlin
MODE_NIGHT_NO // Light theme
MODE_NIGHT_YES // Dark theme
MODE_NIGHT_FOLLOW_SYSTEM // System default
โ Default Behavior
If the user doesnโt make a selection, the app defaults to the systemโs light/dark mode setting.