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