[Android Tips] 1. Getting StatusBar Height
2014-03-20 12:54 shaobin0604 阅读(216) 评论(0) 编辑 收藏 举报public int getStatusBarHeight() { int result = 0; int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { result = getResources().getDimensionPixelSize(resourceId); } return result; }