(1.0.0) Header component height issue in android
See original GitHub issueAm able to reproduce the same issue that i reported earlier in beta version.(https://github.com/react-native-training/react-native-elements/issues/1574#issue-380651167)
I was trying to use the Header component in my app, the header component was working as expected in iOS but in Android I am getting status bar height along with the header component. Is there anyway to remove the status bar height from Android.
Here is the code snippet I have used:
<Header
backgroundColor='transparent'
containerStyle={{ width: '100%', backgroundColor: '#3488C0', borderBottomWidth: 0 }}
leftComponent={{ icon: 'menu', color: '#fff', underlayColor: '#3488C0', onPress: () => this.toggleMenu(), }}
centerComponent={{
text: 'My History',
style: {
fontSize: 20,
fontWeight: 'bold',
fontFamily: Fonts.Lato,
color: 'white'
}
}}
/>
Here is the result I am getting in Android and iOS:
Example:
iOS:
Android:

Environment :
| software | version |
|---|---|
| react-native-elements | 1.0.0 |
| react-native | 0.58.4 |
| npm | 6.7.0 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:23
- Comments:21 (3 by maintainers)
Top Results From Across the Web
programmatically retrieve Header component height - React ...
Header does not expose Height. I faced the same problem and I dove into the code, I realized Height is harcoded in this...
Read more >react-native-image-header-scroll-view - npm
A ScrollView-like component that: Has a fixed image header; Keep the image as a nav bar; Works on iOS and Android. Breaking changes....
Read more >Changelog | Duet Design System
Automatic creation of documentation based on tokens defined. Fixes a bug in Spacer component when the horizontal spacing is used. Makes the footer...
Read more >Media3 - Android Developers
Add Player.getSurfaceSize that returns the size of the surface on which the video is rendered. Fix bug where removing listeners during the player...
Read more >Android ConstraintLayout Example Tutorial - DigitalOcean
Google had introduced android constraint layout editor at Google I/O ... 'com.android.support.constraint:constraint-layout:1.0.0-beta4' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had the same issue. I know it’s kind of a workaround, but I solved this for me adding this prop:
containerStyle={{ paddingTop: 0 }}Yes I use react-navigation. I tried on StackNavigator and TabNavigator and have the same issue.
As a workaround I use the following parameter :
statusBarProps={ translucent: true, }