Android examples for Graphics:Pixel
get Pixel from DIP value
//package com.java2s; 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, dipValue, context.getResources().getDisplayMetrics()); }//from ww w . j ava2s . c o m }