Get Mobile Screen Dimensions in android

by mariganesh 2013-10-18 17:37:02


Get Mobile Screen Dimensions in android

If you want to get mobile screen height and width dynamically in android ,use the following code.


DisplayMetrics displaymetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int height = displaymetrics.heightPixels;
int width = displaymetrics.widthPixels;



477
like
0
dislike
0
mail
flag

You must LOGIN to add comments