笔记:在XML文件中获取ActionBar的宽度
2016-04-23 13:12
246 查看
主要用于4000ActionBar为overlay(覆盖)模式下,不覆盖掉原来要显示出来的布局不使用支持库
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="?android:attr/actionBarSize"> ... </RelativeLayout>
<!-- 使用支持库 Support library compatibility --><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="?attr/actionBarSize"> ...</RelativeLayout>
In this case, the [code]?attr/actionBarSizevalue without the prefix works on all versions, including Android 3.0 and higher.[/code]
相关文章推荐
- android的service基础
- 入驻CSDN博客,或学习或总结或分享
- 对搜狗输入法的评价
- hdu 5246 超级赛亚ACMer-2015年百度之星程序设计大赛 - 初赛(1)
- C++第4次作业
- 反馈及运放基础了解
- Atom 插件
- 对微软自带输入法的一些评价
- 第九周项目一 阅读程序,写出程序运行结果并理解(1)
- Linux下Redis安装使用,主从模式,哨兵模式与PHP扩展(PHP7适用)
- 《Android JNI》03 Jni中的反射
- 连通分量标记算法
- caffe for windows 训练cifar10 及若干问题
- org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thre
- 通过字节码分析JDK8中Lambda表达式编译及执行机制
- 第八周项目33-对类中深复制的体验
- 摄像头自动对焦
- 静态方法与实例方法的区别
- Download Fedora 16 CD / DVD ISO
- for环中创建map,创建的是一个map对象还是多,map和内存的问题