How to get the screen width and height in android

Updated 22 December 2016

Save

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

 

 

 

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home