I am reading this article: http://developer.android.com/guide/practices/screens_support.html
It says that the formula Android uses to convert between a dp
I think that would be the best solution 'cause it is standard method:
int valueInPx= (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_PX, valueInDp, getResources().getDisplayMetrics());