Created
December 4, 2013 07:12
-
-
Save laaptu/7783545 to your computer and use it in GitHub Desktop.
Device Screen Width Height
This file contains 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
WindowManager windowManager =(WindowManager)getSystemService(Context.WindowService); | |
DisplayMetrics displayMetrics = new DisplayMetrics(); | |
windowManager.getDefaultDisplay().getMetrics(displayMetrics); | |
int screenWidth = displayMetrics.widthPixels; | |
int screenHeight = displayMetrics.heightPixels; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment