Nicolás Castellanos Nicolás Castellanos - 11 months ago 114
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?


Answer Source


We can get the StatusBar height in this way:

import { StatusBar } from 'react-native';

This only works on Android.