安卓自定义标题时候you cannot combine custom titles with other 
2016-06-03 10:26
567 查看
转载自:http://blog.sina.com.cn/s/blog_7256fe8f0101cof8.html
title_layout文件
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_layout);
}
}
通过安卓自定义修改标题栏的时候,出现了一个问题
you cannot combine custom titles with other title features
接着程序变崩了。
解决办法
在manifest文件中,修改android:theme="@style/android:Theme.Light"
这样便能正常运行了
title_layout文件
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_layout);
}
}
通过安卓自定义修改标题栏的时候,出现了一个问题
you cannot combine custom titles with other title features
接着程序变崩了。
解决办法
在manifest文件中,修改android:theme="@style/android:Theme.Light"
这样便能正常运行了
相关文章推荐
- 开源作业调度框架 - Quartz.NET - ASP.NET部署
- oracle
- C primer plus 第十章 例题疑问(清单10.18):
- linux系统c++线程池的实现
- 使用数组实现队列
- 02_Flink Streaming SourceFunction
- OverlayManager::destroy(Overlay* overlay)可以优化
- 浅析Java中JSONObject和JSONArray使用
- 你不知道的关于计算机大师Dijkstra的事情
- Dom4j解析XML学习代码
- UVa 11464 Even Parity (二进制法枚举)
- 来来来,看看别人的CSS样式重置表
- GitHub前50名的Objective-C动画相关库
- Maven 手动添加 JAR 包到本地仓库
- 深入浅出学Hive——Hive参数
- 判断颜色是否合法的正则表达式
- 清理 iOS 项目不用的图片资源
- 硬币购物[HAOI2008][Codevs1869]
- 栈的实现
- iOS_如何画1px的线