From 4554a99248fe36e6478e1256617a5fe549452b17 Mon Sep 17 00:00:00 2001 From: omaralalwi Date: Thu, 25 Jun 2026 01:48:56 +0300 Subject: [PATCH] fix / side nav header status bar inset --- .../src/main/java/com/nativephp/mobile/ui/NativeSideNav.kt | 5 ++++- resources/xcode/NativePHP/NativeUI/NativeSideNav.swift | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/androidstudio/app/src/main/java/com/nativephp/mobile/ui/NativeSideNav.kt b/resources/androidstudio/app/src/main/java/com/nativephp/mobile/ui/NativeSideNav.kt index 50e7ffde..e62e0b31 100644 --- a/resources/androidstudio/app/src/main/java/com/nativephp/mobile/ui/NativeSideNav.kt +++ b/resources/androidstudio/app/src/main/java/com/nativephp/mobile/ui/NativeSideNav.kt @@ -90,7 +90,10 @@ fun NativeSideDrawer( gesturesEnabled = hasData && gesturesEnabled, // Controlled via Laravel drawerContent = { ModalDrawerSheet { - Column(modifier = Modifier.fillMaxHeight()) { + // The activity is edge-to-edge (setDecorFitsSystemWindows(false)), + // so without statusBarsPadding the drawer content — including the + // pinned header — is drawn underneath the status bar and clipped. + Column(modifier = Modifier.fillMaxHeight().statusBarsPadding()) { // Render pinned headers at the top (non-scrollable) pinnedHeaders.forEach { child -> if (child.type == "side_nav_header") { diff --git a/resources/xcode/NativePHP/NativeUI/NativeSideNav.swift b/resources/xcode/NativePHP/NativeUI/NativeSideNav.swift index 7538accf..5db79b5b 100644 --- a/resources/xcode/NativePHP/NativeUI/NativeSideNav.swift +++ b/resources/xcode/NativePHP/NativeUI/NativeSideNav.swift @@ -147,6 +147,11 @@ struct NativeSideNavigation: View { if uiState.hasSideNav() { drawerContent .frame(width: drawerWidth) + // The drawer renders edge-to-edge; pad the top by the + // safe-area inset so the header clears the status bar / + // notch instead of being drawn underneath it. Placed + // before .background so the drawer fill still covers it. + .padding(.top, geometry.safeAreaInsets.top) .background(Color(.systemBackground)) .offset(x: drawerXOffset) .zIndex(2)