Can t开发者_如何学Pythonhe 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!
As far as I can tell, that is not possible. The Android documentation of the DisplayMetrics class is misleading. It sucks, I know.
I should add that xdpi and ydpi seem to be wrong on all phones I've tried.
精彩评论