Here you can find the source of getCornerRadius(Context context)
public static float getCornerRadius(Context context)
//package com.java2s; import android.content.Context; import android.util.TypedValue; public class Main { public static final int DEFAULT_CORNER_RADIUS = 10; public static float getCornerRadius(Context context) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_CORNER_RADIUS, context.getResources() .getDisplayMetrics()); }/* w ww .j a v a 2s. com*/ }