Android examples for android.graphics:Pixel
get Pixel value from android.util.TypedValue
import android.content.Context; import android.util.TypedValue; public class Main { public static float getPX(Context context, int dipValue) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30, context.getResources().getDisplayMetrics()); }//www .j a va 2s . co m }