Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Allow setting statusBar height via route config #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cooperka
Copy link

Changes

In the same vein as #104, allow setting the status bar height via route config.

Example

 <StackNavigation
   initialRoute={'home'}
   defaultRouteConfig={{
     navigationBar: {
       backgroundColor: '#fff',
     },
+    statusBar: {
+      height: 0,
+    },
   }}
 />

Motivation

I use a custom status bar in order to have it appear on top of my entire app, including the drawer and scrim. I feel like this makes the drawer look nicer when it's open (see screenshot). I'm sure there are other use cases for this as well.

Screenshot of drawer with status bar

@chirag04
Copy link
Contributor

i get that you want a custom behaviour but most app:

on ios: hide the status bar when you open the drawer.
on android: drawers the status bar on top.

@cooperka
Copy link
Author

@chirag04 thanks for the input. I explored a few different apps on iOS and they all seem to be slightly different. Several hide the status bar and several don't. Personally I like being able to see the status bar even with the drawer open, and it's nice having the option to do so.

@dantman
Copy link

dantman commented Nov 24, 2016

@chirag04 To be fair, that Android behaviour you describe isn't even implemented in ex-navigation yet.

@chirag04
Copy link
Contributor

You have to set the window translucent value in your values.xml

I will post the exact values when I get back on my laptop

@cooperka
Copy link
Author

cooperka commented Jan 2, 2017

Hi @chirag04, any updates on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants