Android examples for Graphics:Pixel
get Pixel From Dip
//package com.java2s; import android.content.Context; public class Main { static public float getPixelFromDip(Context cxt, float dip) { float density = cxt.getResources().getDisplayMetrics().density; return (dip * density + 0.5f); }//from w w w. j av a2 s. co m }