Skip to content

Instantly share code, notes, and snippets.

@laaptu
Created December 6, 2013 11:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laaptu/7822254 to your computer and use it in GitHub Desktop.
Save laaptu/7822254 to your computer and use it in GitHub Desktop.
Android getting status bar height
public int getStatusBarHeight(){
int result=0;\
int resourceId= getResources().getIdentifier("status_bar_height","dimen","android");
if(resourceId >0)
result = getResources().getDimensionPixelSize(resourceId);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment