Cannot Combine Custom Title With Other Title Features
来源:互联网 发布:软件抢票 编辑:程序博客网 时间:2024/06/15 08:44
希望定制活动页面的Title,onCreate中代码如下:
final Window window = getWindow();boolean useTitleFeature = false;if(window.getContainer() == null) { useTitleFeature = window.requestFeature(Window.FEATURE_CUSTOM_TITLE);} SetContentView(Resource.Layout.LiftInspection);if (useTitleFeature) { window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.inspection_title);}
在Android2.3上可以正常工作,但在4.0版本上报如下错误:
Cannot Combine Custom Title With Other Title Features
原因是Android认为你已经设置了活动Title,然后又试图合并入自定义的Title。
解决方法很经验主义:
在styles文件中添加一个新的theme比如mytheme,
在AndroidManiest文件中添加如下活动配置项:
android:theme="@android:style/mytheme"
(不要使用AppTheme)
- Cannot Combine Custom Title With Other Title Features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- You cannot combine custom titles with other title features
- android自定义title出现 You cannot combine custom titles with other title features
- Android4.0上 : 关于you cannot combine custom titles with other title features 错误
- 报错android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
- [Bug 笔记]You cannot combine custom titles with other title features
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features .
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features .
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
- android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
- 多进程访问log文件
- VS纠结的嵌入清单 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- 创建ASP.NET项目时报:http://1.1 400 bad Request错误
- Scintilla CTRL+F 乱码
- 常见的modeladmin,model
- Cannot Combine Custom Title With Other Title Features
- 产品设计与用户体验之—小便池上的苍蝇
- 查看表某个字段被哪些存储过程引用了
- SqlHelper
- hadoop回收站功能
- Bootstarp和Raphael
- python-gtk-3-tutorial(1)
- DDSURFACEDESC2 简介
- CMS