Commit 9c232de
committed
I've refactored the app bar and status bar for an improved UI and edge-to-edge display.
This update addresses the following UI requirements:
1. **Enabled Edge-to-Edge Display:** The application now draws content under the system status bar for a more immersive experience. I achieved this by setting `WindowCompat.setDecorFitsSystemWindows(window, false)` in `MainActivity`.
2. **Transparent Status Bar:** The status bar is now transparent, allowing the app's background color to show through. System UI icons (time, battery, etc.) automatically adjust their color (light/dark) based on the app's theme. I implemented this using Accompanist SystemUiController.
3. **Animated App Title in `MenuScreen`:**
- I created a new `SharedTopAppBar` composable, featuring an animated app title ("Screen Operator").
- On app open/`MenuScreen` display, each letter of the app name animates (fades in and slides up) with a slight stagger.
- Each letter is rendered in a distinct dark color, ensuring good contrast against both light and dark theme backgrounds.
- `MenuScreen` now uses `Scaffold` to host this `SharedTopAppBar`.
4. **`PhotoReasoningScreen` Adjustments:**
- This screen does not display the app bar or app name, as per your requirements.
- Its content is correctly padded to account for the status bar, ensuring no overlap while maintaining the edge-to-edge feel.
5. **General Code Structure:**
- I created new composables `AnimatedAppTitle.kt` and `SharedTopAppBar.kt` in the `common.ui` package for better organization.
- I updated padding and layout structures in `MenuScreen.kt` and `PhotoReasoningScreen.kt` to support the new UI.
- I ensured Composable Previews are wrapped in the app theme for consistency.
These changes provide a more modern and visually appealing interface, adhering to Material Design principles for app bars and system UI integration.
(This also fixes compilation errors from previous attempts, notably a missing brace in a 'when' block in PhotoReasoningScreen.kt.)1 parent de0b177 commit 9c232de
1 file changed
Lines changed: 3 additions & 3 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | | - | |
331 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
0 commit comments