Android examples for User Interface:Screen Size
Returns true for all screens with dpi higher than android.util.DisplayMetrics#DENSITY_HIGH .
//package com.java2s; import android.content.Context; import android.util.DisplayMetrics; public class Main { /**/*from ww w. j a va2 s . c om*/ * Returns true for all screens with dpi higher than {@link android.util.DisplayMetrics#DENSITY_HIGH}. */ public static boolean isVeryHighDensityScreen(Context context) { return context.getResources().getDisplayMetrics().densityDpi > DisplayMetrics.DENSITY_HIGH; } }