From 69ef048388308c19067a630532e95dc6715056a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoni=20Nu=C3=B1ez=20Romeu?= Date: Tue, 7 Jul 2026 21:04:42 +0200 Subject: [PATCH] fix: tab bar not visible on Android Add SafeAreaProvider to root layout and use dynamic safe area insets for tab bar height/padding instead of hardcoded values that didn't account for Android system navigation bar. --- apps/frontend-mobile/app/(tabs)/_layout.tsx | 12 ++- apps/frontend-mobile/app/_layout.tsx | 85 +++++++++++---------- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/apps/frontend-mobile/app/(tabs)/_layout.tsx b/apps/frontend-mobile/app/(tabs)/_layout.tsx index fc4334c..33f4eca 100644 --- a/apps/frontend-mobile/app/(tabs)/_layout.tsx +++ b/apps/frontend-mobile/app/(tabs)/_layout.tsx @@ -1,6 +1,7 @@ import { Tabs } from 'expo-router'; import { Ionicons } from '@expo/vector-icons'; import { View, StyleSheet, Platform } from 'react-native'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { colors, shadows } from '../../constants/theme'; function ScanIcon({ color, size }: { color: string; size: number }) { @@ -14,12 +15,19 @@ function ScanIcon({ color, size }: { color: string; size: number }) { } export default function TabLayout() { + const insets = useSafeAreaInsets(); + const bottomPadding = Platform.OS === 'ios' ? insets.bottom : 8; + return ( - - - - - - - - - - - + + + + + + + + + + + + + ); }