Nicolás Castellanos Nicolás Castellanos - 1 month ago 15
Android Question

React Native: How to get android actionBar height

i'm trying to get the window dimensions with React Native, but it gives me the dimension with the actionBar height, i need to substract it.

How can i do that?

Thanks

Answer

RESOLVED

We can get the StatusBar height in this way:

import { StatusBar } from 'react-native';
console.log(StatusBar.currentHeight)

This only works on Android.