public static int dpToPx(Context context, int dp) {
    return (int)
        TypedValue.applyDimension(
            TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
  }
Invoke one into the Activity to get info about the Display size

@param activity The Activity
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/SizeUtil.java