private void initStatusBarHeight() {
try {
Class<?> c = Class.forName("com.android.internal.R$dimen");
Object obj = c.newInstance();
Field field = c.getField("status_bar_height");
int x = Integer.parseInt(field.get(obj).toString());
statusBarHeight = getResources().getDimensionPixelSize(x);
} catch (Exception e1) {
Log.e("buddha", "get status bar height fail");
}
}
try
Class<?>
Object
Field
int
statusBarHeight
}
Log.e("buddha",
}
}