Created
March 16, 2017 22:15
-
-
Save programmation/0d16ac7f7d11fec3df6df1fb0789e609 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private int GetNavBarHeight() | |
{ | |
int resourceId = Resources.GetIdentifier("navigation_bar_height", "dimen", "android"); | |
if (resourceId > 0) | |
{ | |
return Resources.GetDimensionPixelSize(resourceId); | |
} | |
return 0; | |
} | |
private int GetStatusBarHeight() | |
{ | |
int resourceId = Resources.GetIdentifier("status_bar_height", "dimen", "android"); | |
if (resourceId > 0) | |
{ | |
return Resources.GetDimensionPixelSize(resourceId); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment