Android examples for Graphics:Pixel
pixels Per Dip
//package com.java2s; import android.content.Context; public class Main { public static float pixelsPerDip(Context context) { final float scale = context.getResources().getDisplayMetrics().density; return (scale + 0.5f) / 160; }/*from ww w .j a va2 s . c om*/ }