How to get screen width and height of the phone


DisplayMetrics mdmetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(mdmetrics);

int height = mdmetrics.heightPixels;
int weight = mdmetrics.widthPixels;

Share!

Enjoy the article so far? Recommend it to your friends and peers.

Subscribe! (free)

Be the first to our articles and get latest updates on freebies.

0 comments:

Post a Comment