Skip to content

Instantly share code, notes, and snippets.

@ishitcno1
Created April 14, 2015 10:43
Show Gist options
  • Save ishitcno1/a5ccf920424e998b56fb to your computer and use it in GitHub Desktop.
Save ishitcno1/a5ccf920424e998b56fb to your computer and use it in GitHub Desktop.
android display width height
DisplayMetrics displaymetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int height = displaymetrics.heightPixels;
int width = displaymetrics.widthPixels;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment