How to get the screen width and height in android

In this small blog,
We will show you the simple methods to get your screen width and height in pixels as well as in dp.

Screen width or height in pixels

If you have used this method in an Activity,

If you’re not in an Activity you can get the default Display via WINDOW_SERVICE

 

Screen width or height in dp

 

 

 

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close