Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 762 Bytes

2016-06-12.md

File metadata and controls

26 lines (23 loc) · 762 Bytes

#2016-06-12

###Bloom Filter Article 1
Article 2

###Get Height Of Status Bar

public static int getStatusBarHeight(Context context){
    Class<?> c = null;
    Object obj = null;
    Field field = null;
    int x = 0, statusBarHeight = 0;
    try {
        c = Class.forName("com.android.internal.R$dimen");
        obj = c.newInstance();
        field = c.getField("status_bar_height");
        x = Integer.parseInt(field.get(obj).toString());
        statusBarHeight = context.getResources().getDimensionPixelSize(x);
    } catch (Exception e1) {
        e1.printStackTrace();
    }
    return statusBarHeight;
}