How to find the device as LDPI MDPI HDPI or XHDPI [duplicate]
This question already has an answer here: How to check an Android device is HDPI screen or MDPI screen? 6 answers Without any code snippet for the application, how to get screen resolution and length of the screen. How could I find whether the device is ldpi, mdpi , hdpi or xhdpi ? Pragnani Edit: use DisplayMetrics to get the density of the screen getResources().getDisplayMetrics().densityDpi; this will return the int value that represents the following constants. DisplayMetrics.DENSITY_LOW ,DisplayMetrics.DENSITY_MEDIUM, DisplayMetrics.DENSITY_HIGH, DisplayMetrics.DENSITY_XHIGH int density=