Files
fksar/docs/thijooree/16-settings-appearance.md
T
2026-06-13 21:30:12 +05:00

93 lines
3.1 KiB
Markdown

# Settings — Appearance
Controls navigation mode, nav slot assignment, theme, accent colour, and language.
---
## Fragment — `SettingsAppearanceFragment`
---
## Navigation Mode
A `MaterialButtonToggleGroup` with three options (`SettingsAppearanceFragment.kt:65-80`):
| Mode | Value | Description |
|---|---|---|
| Drawer (default) | `NAV_MODE_DRAWER` | Slide-out navigation drawer |
| Bottom | `NAV_MODE_BOTTOM` | Bottom bar with 3 visible slots + pinned Dashboard + More |
| Circular | `NAV_MODE_CIRCULAR` | Radial wheel — see [Circular Nav](26-circular-nav.md) |
Changing mode takes effect immediately; `HomeActivity` recreates its navigation structure.
---
## Navigation Slot Customisation — `NavCustomization`
Drag-and-reorder lists tailored per mode (`NavCustomization.kt:52-93`). The disabled list is dimmed to 38% opacity.
### Bottom Navigation Mode
- **3** slots in the bottom bar (defaults: Accounts, Contacts, Transfer)
- Dashboard is always pinned as the leftmost tab and is not part of the 3-item pool
- All non-slot items appear in the **More** bottom sheet (`NavMoreSheetFragment`)
- `switchShowLabels` toggle controls whether the bottom-bar items render text labels
### Circular Navigation Mode
- **4** customisable wheel slots (defaults: Transfer, Cards, Contacts, Accounts)
- Dashboard, More and the wheel-lock are always present at 6 o'clock / 8 o'clock / centre
### Quick Action Slots
Two dedicated FAB-style slots on the dashboard. Defaults: Transfer + PayMV QR. Hidden when the user is in Bottom mode (the dashboard hides the FAB row when a bottom bar is present).
### Persistence
Each slot is stored individually in `SharedPreferences` (`bottom_nav_slot_{n}_key`, `circular_slot_{n}_key`, `quick_action_{n}_key`).
---
## Theme
A three-way selector applied via `AppCompatDelegate.setDefaultNightMode()`:
| Option | Behaviour |
|---|---|
| System default | Follows the device's dark/light mode |
| Light | Forces light theme |
| Dark | Forces dark theme |
### Pitch Black
`switchPitchBlack` (`SettingsAppearanceFragment.kt:162-166`) — only enabled in **Dark** mode. Applies `ThemeOverlay_PitchBlack` for OLED-friendly true-black surfaces.
---
## Accent Colour
A toggle group (`accentToggle`) with four options (`SettingsAppearanceFragment.kt:172-192`, `ThemeHelper.kt:14-17`):
| Option | Seed |
|---|---|
| Blue (default) | `#3F65AD` |
| Red | `#D32F2F` |
| Green | `#4CAF50` |
| Custom | User-picked hex stored in `accent_custom_color` |
On API 31+ the seed is fed through `DynamicColors.applyToActivityIfAvailable(...).setContentBasedSource(seedBitmap)` for a full content-derived palette. On older releases a static `ThemeOverlay_Accent_*` style is applied. Disabled when Theme = System (dynamic colours own the palette).
---
## Language
A toggle group (`languageToggle`) with two options — **English** and **Dhivehi**. There is no "System default" entry. Applied via `AppCompatDelegate.setApplicationLocales()`; takes effect immediately.
---
 
---
[← Settings — Security](15-settings-security.md)     **Next →** [Settings — Storage](17-settings-storage.md)