摘要: 网上流行一段代码获取状态栏高度 如下:Rect frame =newRect();getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);intstatusBarHeight = frame.top;但是这个方法在 onCreate()方法中,获取高度为0不在onCreate()方法中是有效的现提供一方法,可以在任何时候都能获得正常高度。 //获取手机状态栏高度 public static int getStatusBarHeight(Context context){ Class<?> c = n... 阅读全文
posted @ 2013-05-27 13:07 ConquerMobileApp 阅读(4333) 评论(0) 推荐(0) 编辑