Nicolás Castellanos Nicolás Castellanos - 1 year ago 185
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download