How to Get Width and Height of Android Screen in Pixels

Sometimes you want to know the screen width and height in pixels. An example can be that you are developing a system information app and you have to display screen width and height in your activity. This is going to be so simple with very few lines of code. The following code snippet give you the screen width and height in pixels.

Enjoy Coding and Share Knowledge





Show Buttons
Hide Buttons