How to get the screen width and height in android

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

 

 

 

 

. . .

Leave a Comment

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


Be the first to comment.

css.php

The results provided were above our expectations both in deliverability timeline as well as operation. They are a top-notch company with many resources and a company we feel honoured to work with again!

Lee Seward

Lee Seward

Founder, Gro-Connect

Talk to Sales

Global

Live Chat
Start a Project


    Message Sent!

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

    Back to Home