useBottomTabBarHeight incorrect height? #9723
-
I'm wondering If I'm doing something wrong or if this is a bug. I have a FlatList inside a bottomTabBar navigation. I want each item in the FlatList to fill up the screen. So I calculate the width and height of a FlatList item as followed: import { Dimensions } from 'react-native'
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
const width = Dimensions.get('window').width
const height = Dimensions.get('window').height-useBottomTabBarHeight() The function Is there something I'm missing here? EDIT: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
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: