rfresh Well-Known Member Licensed User Longtime User Feb 25, 2012 #1 How can I detect the screen DPI? I'm currently fetching the screen's .Width and .Height properties via the Activity.Width, etc. Can I get the DPI too? Thanks...
How can I detect the screen DPI? I'm currently fetching the screen's .Width and .Height properties via the Activity.Width, etc. Can I get the DPI too? Thanks...
barx Well-Known Member Licensed User Longtime User Feb 25, 2012 #2 Not sure if there is a direct call for dpi. But there is a 'density' keyword which is dpi / 160. so something like: B4X: Dim intDPI as int intDPI = density * 160 I don't think DPI's are ever NOT a int value, but you could declare it as a float to be sure. Upvote 0
Not sure if there is a direct call for dpi. But there is a 'density' keyword which is dpi / 160. so something like: B4X: Dim intDPI as int intDPI = density * 160 I don't think DPI's are ever NOT a int value, but you could declare it as a float to be sure.
T timo Active Member Licensed User Longtime User Feb 25, 2012 #3 http://www.b4x.com/forum/basic4android-updates-questions/13238-motorola-razer.html#post74596 Post#5 Upvote 0