-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Fixes #4934. Since API level 17, there has a `Display.getRealMetrics` method. This allows us to get the actual sizes of the screen (including soft menu bar and other system decor elements). See: http://developer.android.com/reference/android/view/Display.html#getRealMetrics(android.util.DisplayMetrics) I'm not sure if there is a good way to write unit or integration tests for this. Please let me know if there are any suggestions or concerns. Closes #4935 Reviewed By: svcscm Differential Revision: D2811091 Pulled By: bestander fb-gh-sync-id: fed4e357db7eb36d638eebabd8ced4bdffd766a4
- Loading branch information
Showing
1 changed file
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8e60394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaysoo But how can this file be implemented into my React-Native Android project?
I have had this problem for a long time. I created an issue on you react-native-extra-dimensions-android repository if you have the time could you please have a look.
Thanks.
8e60394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any example?
8e60394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example ?
8e60394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Larney11 but what this PR fixes in RN? Do I still need https://github.com/BelinChung/react-native-extra-dimensions-android to detect real screen size (exclude status bar, menu bar, etc)?
8e60394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from https://github.com/BelinChung/react-native-extra-dimensions-android
follow this link for more details.
I think you will still need to use what I explained on StackOverflow.