Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://developer.android.com/about/dashboards/index.html#Screens
- private static String getDensityName(DisplayMetrics dm) {
- float density = dm.density;
- if (density >= 4.0) {
- return "xxxhigh density";
- }
- if (density >= 3.0) {
- return "xxhigh density";
- }
- if (density >= 2.0) {
- return "xhigh density";
- }
- if (density >= 1.5) {
- return "high density";
- }
- if (density >= 1.0) {
- return "medium density";
- }
- return "low density";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement