In react-navigation, how do I get the dimensions of the visible area between the header and TabBar?

后端 未结 4 858
鱼传尺愫
鱼传尺愫 2021-02-15 11:43

const viewableWindowHeight = Dimensions.get(\'window\').height - Header.HEIGHT - ???

How do I get the TabBar height? What if the iPhone is X? How can I take that into a

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-15 12:14

    You can simply use SafeAreaView which will automatically set topBarHeight mainly for iPhoneX phones.

提交回复
热议问题