From 3d4db5f6801fa823623395a3347461c9545a5cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Fri, 8 Nov 2024 09:58:05 +0100 Subject: [PATCH] fix: hide routes with opacity 0 for Android (#129) --- src/TabView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TabView.tsx b/src/TabView.tsx index 37792ff..9d14c8b 100644 --- a/src/TabView.tsx +++ b/src/TabView.tsx @@ -271,6 +271,7 @@ const TabView = ({ } const focused = route.key === focusedKey; + const opacity = focused ? 1 : 0; const zIndex = focused ? 0 : -1; return ( @@ -282,7 +283,7 @@ const TabView = ({ importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'} style={ Platform.OS === 'android' - ? [StyleSheet.absoluteFill, { zIndex }] + ? [StyleSheet.absoluteFill, { zIndex, opacity }] : styles.fullWidth } >