tags:

views:

26

answers:

2

Can the xdpi and ydpi settings be relied upon to accurately represent the physical pixels in once inch of screen space? I need this to be accurate for some display code I'm writing. I realize the documention says that this is the case, but I need to know if individual handsets get this right MOST OF THE TIME.

I know I can alternately use "densitiy" which will give me 120, 160, 240 steps of DPI, but an exact dpi would be much better.

Thanks!

A: 

As far as I can tell, that is not possible. The Android documentation of the DisplayMetrics class is misleading. It sucks, I know.

CrazyJay
A: 

I should add that xdpi and ydpi seem to be wrong on all phones I've tried.

CrazyJay