Monday, January 27, 2014

Android: Determine Screen Size

With the following lines of code width and height of the smartphone display can be determined under Android:
int ScreenWidth = Resources.DisplayMetrics.WidthPixels;
int ScreenHeight = Resources.DisplayMetrics.HeightPixels;

No comments:

Post a Comment