开发者

Is displayMetrix xdpi and ydpi accurate?

开发者 https://www.devze.com 2022-12-27 03:08 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消