I need to adjust my GUI to multiple devices and check how my app looks on them. Many of the I don't have. How can I know device density (hdpi, xhdpi... etc.) on specific device without looking for each device on the web. I have this table: http://www.emirweb.com/ScreenDeviceStatistics.php but its not complete. Is there fast way to getting this information?
2 Answers
IMO You are not adopting the right approach to screen sizes. To be sure that all devices will be supported, you should add all your images in the corresponding folders mdpi, hdpi xhdpi and so on, and not the other way round(Adding image by devices). Android is intelligent enough to detect the devices density and display the right format. Let's say you run your app on an xxhdpi device, and you don't have an image that corresponds to it, Android is intelligent enough to choose an image from the closest folder to xxhdpi, it could be xxxhdpi or xhdpi.

- 729
- 9
- 19
Take a look at:
http://developer.android.com/reference/android/util/DisplayMetrics.html
and here:
How to get screen display metrics in application class
However if you want to adjust your layout to specific devices I strongly suggest reading this stuff: http://developer.android.com/guide/practices/screens_support.html
-
As I said, I do not have the devices so code will not help. I just need some reference where I can get this information and just add images to the correct folder. – Dim Sep 17 '15 at 07:40