Skip to content

Instantly share code, notes, and snippets.

@mstefanko
Created March 28, 2011 13:15
Show Gist options
  • Save mstefanko/890424 to your computer and use it in GitHub Desktop.
Save mstefanko/890424 to your computer and use it in GitHub Desktop.

Revisions

  1. mstefanko created this gist Mar 28, 2011.
    6 changes: 6 additions & 0 deletions Calculate android screen size
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    Display display;
    display = ((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay();

    int height = display.getHeight();

    int width = display.getWidth();