Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions packages/mobile/src/components/bottom-tab-bar/BottomTabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useCallback } from 'react'
import type { BottomTabBarProps as RNBottomTabBarProps } from '@react-navigation/bottom-tabs'
import type { BottomTabNavigationEventMap } from '@react-navigation/bottom-tabs/lib/typescript/src/types'
import type { NavigationHelpers, ParamListBase } from '@react-navigation/native'
import { Animated } from 'react-native'
import { Animated, Platform } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'

import { Flex } from '@audius/harmony-native'
Expand Down Expand Up @@ -102,11 +102,24 @@ export const BottomTabBar = (props: BottomTabBarProps) => {
})
}, [navigation])

const isAndroid = Platform.OS === 'android'

return (
<Animated.View
style={[
{ zIndex: 4, elevation: 4 },
interpolatePostion(translationAnim, insets.bottom)
{
zIndex: 4,
elevation: 4,
// If not absolutely positioned, the bottom tab bar will float above the keyboard
...(isAndroid && {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
backgroundColor: 'white'
})
},
!isAndroid && interpolatePostion(translationAnim, insets.bottom)
]}
>
<Flex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ReactNode } from 'react'
import React, { type ReactNode } from 'react'

import { reachabilitySelectors } from '@audius/common/store'
import Animated, { FadeIn } from 'react-native-reanimated'
Expand Down