Skip to content

Instantly share code, notes, and snippets.

@shirou
Created September 27, 2010 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirou/598729 to your computer and use it in GitHub Desktop.
Save shirou/598729 to your computer and use it in GitHub Desktop.
private void getDeviceInfo(){
WindowManager windowmanager = (WindowManager)getSystemService(WINDOW_SERVICE);
Display disp = windowmanager.getDefaultDisplay();
deviceWidth = disp.getWidth();
deviceHeight = disp.getHeight();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment