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

Allow setting statusBar height via route config - #263

Open
cooperka wants to merge 1 commit into
expo:masterfrom
cribspot:set-status-bar-height
Open

Allow setting statusBar height via route config#263
cooperka wants to merge 1 commit into
expo:masterfrom
cribspot:set-status-bar-height

Conversation

@cooperka

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

dantman commented Nov 24, 2016

Copy link
Copy Markdown

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

@chirag04

Copy link
Copy Markdown
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

cooperka commented Jan 2, 2017

Copy link
Copy Markdown
Author

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