Tutorials Android How to Determine Android Screen Size Width and Height

How to Determine Android Screen Size Width and Height

The following code snippet shows how to determine the screen size dimensions in width and height of the Android device your application is running on.

Display display = mActivity.getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;

Log.e("Width : " + width);
Log.e("Height : " + height);
Total
0
Shares
Leave a Reply

Your email address will not be published.

Previous Post

How to Trust All Certificates for HttpURLConnection in Android

Next Post
Android Tutorials

How to Add an Event to Android Calendar

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All