2.9 KiB
2.9 KiB
Walkthrough - Edge-to-Edge Layout Fixes
I have implemented comprehensive edge-to-edge layout support across the GajuMobile wallet. This ensures that UI elements, particularly bottom action buttons, are correctly positioned above system software navigation bars and below the status bar, preventing any awkward overlap on modern Android devices.
Changes Made
[core]
- [MODIFY] MainActivity.kt: Disabled
isNavigationBarContrastEnforcedto allow the app's custom theme and backgrounds to flow seamlessly into the system navigation area.
[ui-components]
- [MODIFY] GajuComponents.kt:
- Updated
GajuBottomNavigationto usewindowInsetsPadding(WindowInsets.navigationBars), ensuring the navigation icons stay above the system buttons. - Refactored
SuccessLayoutto use a properScaffoldwith a fixedbottomBarfor action buttons, utilizinginnerPaddingfor the main scrollable content.
- Updated
[ui-screens]
- OnboardingFlow.kt & SplashScreen.kt: Applied
safeDrawingPadding()to top-level containers to keep branding and buttons within the safe viewport. - WalletSetupScreens.kt, TransactionScreens.kt, & ManagementScreens.kt:
- Refactored screens with bottom buttons (e.g., Mnemonic Grid, Send Form, Manage Detail) to use
Scaffold. - Moved action buttons into the
bottomBarslot, ensuring they are fixed and correctly spaced above system navigation. - Wrapped middle content in
verticalScrolland appliedinnerPadding, allowing long lists (like the 24-word recovery grid) to scroll properly without being cut off.
- Refactored screens with bottom buttons (e.g., Mnemonic Grid, Send Form, Manage Detail) to use
Layout Improvements
- Fixed Overlap: Critical buttons like "CONTINUE", "NEXT", and "SEND" are now guaranteed to be tappable and visible above software buttons.
- Scrolling Robustness: Long forms and lists now utilize the full height of the screen, scrolling behind the transparent system bars while maintaining clear interaction boundaries.
Verification Results
Build & Deploy
- Successfully executed
./gradlew assembleDebug. - Verified in Compose Preview that the
bottomBarcorrectly accounts for system insets in both Dark and Light modes.