Skip to content

useBottomTabBarHeight incorrect height? #9723

Answered by tamis-laan
tamis-laan asked this question in Q&A
Discussion options

You must be logged in to vote

Ah for anyone dealing with the same problem it turns out it was the size of the status bar in android that was the culprit:

  import { Dimensions, StatusBar } from 'react-native'
  import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';

  const width  = Dimensions.get('window').width
  const height = Dimensions.get('window').height-useBottomTabBarHeight()-StatusBar.currentHeight

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gauravstanza
Comment options

Answer selected by tamis-laan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants