获取状态栏高度

Rect frame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
int statusBarHeight = frame.top;

获取actionBar的高宽度

有一个属性:

android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"

获取屏幕高度,宽度

DisplayMetrics dm = new DisplayMetrics();  

this.getWindowManager().getDefaultDisplay().getMetrics(dm);//this指当前activity  

screenWidth =dm.widthPixels;  

screenHeight =dm.heightPixels;

最新文章

  1. C# base 64图片编码解码
  2. node-sass安装不成功的解决方案
  3. Oracle round函数是什么意思?怎么运用?
  4. The Run-Time Constant Pool The Constant Pool
  5. 由于无法创建应用程序域,因此未能执行请求。错误: 0x80070002 系统找不到指定的文件
  6. NetworkComms.Net github下载地址
  7. WEB安全--Google Hacking
  8. 【转】Microsoft® SQL Server® 2012 Performance Dashboard Reports
  9. RTMP协议详解(转)
  10. leetcode@ [139/140] Word Break & Word Break II
  11. Graphql graffiti
  12. 解决Crystal Report XI R2不能在64操作系统正常工作的问题-web程序
  13. World Cup
  14. java基础解析系列(十)---ArrayList和LinkedList源码及使用分析
  15. Google Translation Via Python
  16. 纵观 jBPM:从 jBPM3 到 jBPM5 以及 Activiti5
  17. Leetcode:204
  18. android小程序-电子钢琴-滑动连续响应
  19. Excel 如何快速切换到最后一行
  20. django分页的东西, 不详细, 但是也足够了。

热门文章

  1. 天气预报API简单实现
  2. USACO Section 2.4 回家 Bessie Come Home
  3. 洛谷P1472 奶牛家谱 Cow Pedigrees
  4. 华为OJ平台——输出最小的k个数
  5. TCP/IP详解学习笔记(13)-- TCP连接的建立与终止
  6. 用PHP实现守护进程任务后台运行与多线程(php-resque使用说明)
  7. Loadrunner:集合点(Rendezvous)
  8. poj1942 Paths on a Grid
  9. NC V6 安装目录各文件夹作用描述
  10. 通过Migration在EF6中用多个DbContext