Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RCTStatusBarManager] How do I get the initial status bar frame? #2515

Closed
jedlau opened this issue Sep 1, 2015 · 11 comments
Closed

[RCTStatusBarManager] How do I get the initial status bar frame? #2515

jedlau opened this issue Sep 1, 2015 · 11 comments
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.

Comments

@jedlau
Copy link
Contributor

jedlau commented Sep 1, 2015

v0.11.0-rc introduces status bar change events through the DeviceEventEmitter. How should I be getting the initial dimensions of the status bar (i.e., before any events fire)? The use case is so that I can size my view appropriately when it first mounts, and the status bar is not the normal 20 pts. in height (e.g., hotspot or maps navigation is on).

@brentvatne
Copy link
Collaborator

@jedlinlau - good question! It doesn't look like this is possible right now. Could you try modifying https://github.com/facebook/react-native/blob/b998e5a7b74905b30b1137a02e14cd5e6f97fccc/React/Modules/RCTStatusBarManager.m to add an exported function that grabs the current state? cc @a2

@brentvatne
Copy link
Collaborator

@jedlinlau - I've implemented this before here: https://github.com/brentvatne/react-native-status-bar-size/blob/master/RNStatusBarSize/RNStatusBarSize.m - so you should be able to base your implementation off of that. This would be a great way to get a first contribution in 😄

@brentvatne brentvatne added the Good first issue Interested in collaborating? Take a stab at fixing one of these issues. label Sep 13, 2015
@grabbou
Copy link
Contributor

grabbou commented Sep 13, 2015

@brentvatne could you assign me so I don't forget about this one?

@ide
Copy link
Contributor

ide commented Sep 13, 2015

Looks like we can assign only to accounts marked as Collaborators.

@vjeux could you get @grabbou added to the GitHub group with the React Conf attendees who were in the react-native preview? I think that should get him collab status.

@vjeux
Copy link
Contributor

vjeux commented Sep 14, 2015

This group is long gone unfortunately :( Everyone there had push access to the repo :x

@ide
Copy link
Contributor

ide commented Sep 14, 2015

@vjeux mm ok. @grabbou looks like github doesn't let me assign this to you 😕

@brentvatne
Copy link
Collaborator

@grabbou I hereby dub this issue assigned to you

@jedlau
Copy link
Contributor Author

jedlau commented Sep 14, 2015

@brentvatne : Thanks! Looks like I wasn't quick enough to grab this one, though. I'll look for another "Good first task" issue to tackle.

@christopherdro
Copy link
Contributor

@jedlau Care to give this a shot?

ghost pushed a commit that referenced this issue Jan 4, 2016
Summary:
Addresses #2515 .
Closes #5039

Reviewed By: svcscm

Differential Revision: D2799224

Pulled By: nicklockwood

fb-gh-sync-id: 8f0a0f229a1588b1033b0121868c1f82e4dc6684
@joshuagutierrez
Copy link

Should this issue be closed now?

@jedlau
Copy link
Contributor Author

jedlau commented Feb 10, 2016

Yes, closing.

@jedlau jedlau closed this as completed Feb 10, 2016
@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants