Android examples for android.util:DisplayMetrics
get Scaled Density
import android.content.Context; import android.util.DisplayMetrics; public class Main { public static float getScaledDensity(Context context) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); return dm.scaledDensity; }/* w w w. ja va 2 s.c o m*/ }