Android examples for Animation:Scale Animation
get Scaled Density
//package com.java2s; import android.content.Context; import android.util.DisplayMetrics; public class Main { private static DisplayMetrics metrics; public static float getScaledDensity(Context context) { if (metrics == null) { getDisplayMetrics(context);//from w w w .ja va 2 s . co m } return metrics.scaledDensity; } public static DisplayMetrics getDisplayMetrics(Context context) { if (metrics == null) { metrics = context.getResources().getDisplayMetrics(); } return metrics; } }