Android examples for Graphics:Pixel
get Scaled Pixels
//package com.java2s; import android.content.Context; public class Main { @SuppressWarnings("unused") public static int getScaledPixels(Context ctx, int unscaled) { return (int) (unscaled * ctx.getResources().getDisplayMetrics().density + 0.5f); }/*from w w w . ja v a2 s . co m*/ }