使用ActionBar缺少主题时jar包中抛类型转换异常
2016-07-21 10:47
423 查看
使用ActionBar缺少主题时jar包中抛类型转换异常:
07-20 18:11:36.467: E/AndroidRuntime(25775): java.lang.ClassCastException:
android.widget.LinearLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams
解决方案为styles中加上主题AppTheme:
<resources>
<style name="AppBaseTheme" parent="@android:style/Theme.DeviceDefault"></style>
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
07-20 18:11:36.467: E/AndroidRuntime(25775): java.lang.ClassCastException:
android.widget.LinearLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams
解决方案为styles中加上主题AppTheme:
<resources>
<style name="AppBaseTheme" parent="@android:style/Theme.DeviceDefault"></style>
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
相关文章推荐
- c++学习笔记(二):数据类型
- java提高篇(十二)-----代码块
- 让您的Xcode键字如飞
- 代码调优
- JAVA实现冒泡排序和二分查找
- 2016 Multi-University Training Contest 1-1005---HDU 5727 Necklace(枚举+二分图匹配)
- ol3中文帮助
- cfg 字节序问题Section not found: must start with section
- 1002. 写出这个数 (20)
- Dictionary 字典
- 常见ML算法及其对应的使用对象
- go利用x/net/html包实现的蜘蛛
- 集群的分类、特点以及区别
- UML设计模式之UML
- CodeForces 682B Alyona and Mex (排序+离散化)
- Storm(2015.08.12笔记)
- Ubuntu12.04 安装网卡驱动
- Codeforces Round #254 (Div. 2)C DZY Loves Physics(图论结论题)
- 51Nod 1358 浮波那契 (矩阵快速幂)
- #if defined和#if !defined(c语言的宏定义)