Aug 2, 2011

How to Know System Density And Screen Resoulation


how to Know System Density :
-----------------------

or low scale:0.75

for medium scale:1.0

for large scale:1.5

float scale; DisplayMetrics displaymetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);

scale =getApplicationContext().getResources().getDisplayMetrics().density;


how to screen resoulation :
==========================

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

final int height = dm.heightPixels;
final int width = dm.widthPixels;



web site to know screen resoluation:
===========
http://www.whatismyscreenresolution.com/

No comments:

Post a Comment