android theme ActionBar
来源:互联网 发布:linux sudo命令详解 编辑:程序博客网 时间:2024/05/24 05:04
1、application可以指定theme,activity也可以指定theme,如果acivity没有显示指明theme,那默认使用application的theme
2 、Since the version 22.1.0, the class ActionBarActivity
is deprecated. You should use AppCompatActivity
.默认创建as工程,Activity是继承自ActionBarActivity,实际上ActionBarActivity已经被废弃了,官方建议使用AppCompatActivity来代替,但是你不替换也没关系。我们项目中依然使用ActionBarActivity
3、如果一个activity没有指定label,那他的actionbar将使用application的label
4、onCreateOptionsMenu只是把菜单项添加到ActionBar里,实际上ActionBar早就存在了
并不是在onCreateOptionsMenu内部创建ActionBar的
actionBar.setCustomView也是类似的,并不是说ActionBar就是这个view,而是把这个view加到一个viewGroup里区,ActionBar是个ViewGroup
5、Actionbar有个参数可以使内容和ActionBar公用空间android:windowActionBarOverlay
举例如下
<?xml version="1.0" encoding="utf-8"?><resources> <style name="MyTheme" parent="@style/LightBaseActionBarTheme"> <item name="windowActionBarOverlay">true</item> <item name="android:windowActionBarOverlay">true</item> </style></resources>
参考文献
http://blog.chengyunfeng.com/?p=497
http://www.pureerf.com/android/actionbar
0 0
- android theme ActionBar
- Android修炼之道——Theme自定义ActionBar
- Android 自定义Actionbar 出错解决办法 及 Theme常用属性
- 【Android】自定义Style或Theme及自定义ActionBar
- Can't Find Theme.AppCompat.Light for New Android ActionBar Support
- android:theme
- android:theme
- android theme
- Android:theme
- android theme
- Android Theme
- android theme
- android:theme
- android Theme
- android:theme
- Android:theme
- Android Theme
- Android Theme
- linux 之静默安装oracle
- ZOJ 3469 Food Delivery
- C++ STL::bitset
- C++字符串string类提供的处理字符串的函数
- 自动装箱拆箱
- android theme ActionBar
- HDU5389.Zero Escape
- 黑马程序员-----------C语言基础-----------数组
- 可修改主席树
- Linux C编程的DEBUG宏
- hdu 5385 The path
- 【POJ 1260】Pearls
- 如何快速将vc++的类转换为c#/cli
- JSON格式注册登录查询byHttpClientDoPost