-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Query Device attributes, etc? #74
Comments
There's a Dimensions module that's not exposed yet. We're working on getting our synchronization in order to be able to expose it |
We're actually re-thinking how this works because it's usually not the right thing to simply grab the screen dimensions (not robust to device rotation, in-call notification bar, etc). We definitely need to provide a solution soon though!
|
Thanks guys. I imagine people are going to want to do query the device as they are used to doing this with HTML5 apps :) |
I think some sort of access to the device screen size and capabilities is badly needed. |
+1 |
@chirag04 @stefalda - What capabilities did you have in mind? In terms of screen size, what information do you want to have access to beyond the width/height and pixel ratio? width/height are currently available with So I think this issue is more about being able to watch the device for events that might change the dimensions eg rotation: #426. We can watch for changes in status bar size using react-native-status-bar-size. What else am I missing? |
There is also https://github.com/pjjanak/react-native-viewport for viewport sizes. |
@brentvatne I didn't know about those methods, but I think they'd be enough for now. |
@brentvatne We only need width/height and pixel ratio and for now we are using But as i read in github issues, dimensions is going to go and is a bad practice. Documented component/module for this would be helpful. |
Added cursor pointer to none active thread items
Hi,
How does one query Device attributes like screen dimensions via the JS bridge?
The text was updated successfully, but these errors were encountered: