Skip to content

Commit 3d4db5f

Browse files
authored
fix: hide routes with opacity 0 for Android (#129)
1 parent 2648047 commit 3d4db5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TabView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ const TabView = <Route extends BaseRoute>({
271271
}
272272

273273
const focused = route.key === focusedKey;
274+
const opacity = focused ? 1 : 0;
274275
const zIndex = focused ? 0 : -1;
275276

276277
return (
@@ -282,7 +283,7 @@ const TabView = <Route extends BaseRoute>({
282283
importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'}
283284
style={
284285
Platform.OS === 'android'
285-
? [StyleSheet.absoluteFill, { zIndex }]
286+
? [StyleSheet.absoluteFill, { zIndex, opacity }]
286287
: styles.fullWidth
287288
}
288289
>

0 commit comments

Comments
 (0)