android 自定义titlebar标题栏冲突问题
来源:互联网 发布:js实现div隐藏显示 编辑:程序博客网 时间:2024/05/24 04:28
android自定义标题栏的时候,使用下面方法:
- requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
- setContentView(R.layout.main);
- getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.mycustomtitle);
- }
原因:
因为在manifest文件里使用了
android:theme="@style/AppTheme" >
解决方法:
在style.xml中修改加入这句“ <item name="android:windowActionBar">false</item>” 如下:
<span style="color:#333333;"><resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> <style name="AppBaseTheme" parent="android:Theme.Light"> <!-- Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. --> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <!-- All customizations that are NOT specific to a particular API-level can go here. --> </span><span style="color:#ff0000;"><item name="android:windowActionBar">false</item> </span><span style="color:#333333;"> </style></resources></span>
0 0
- android 自定义titlebar标题栏冲突问题
- 自定义Android标题栏TitleBar
- Android 自定义标题栏 TitleBar
- 自定义Android标题栏TitleBar布局
- 自定义Android 标题栏TitleBar布局
- 自定义Android标题栏TitleBar布局
- Android - 自定义标题栏(TitleBar)
- 自定义Android标题栏TitleBar布局
- 转:自定义Android标题栏TitleBar
- 自定义Android 标题栏TitleBar布局
- 自定义Android标题栏TitleBar布局
- 自定义ANDROID标题栏TITLEBAR布局
- 自定义Android 标题栏TitleBar布局
- 自定义Android标题栏TitleBar布局
- Android:自定义标题栏(titlebar)
- 自定义Android标题栏TitleBar布局
- [Android]自定义View标题栏TitleBar
- android学习——自定义标题栏titlebar
- 判断两个链表是否相交并找出交点
- Spring 2 学习实践
- Qt数字与字符串之间的相互转换
- 我的编程学习日志(8)--排序(冒泡,选择,快速以及sort函数)
- Linux下检测进程是否存在
- android 自定义titlebar标题栏冲突问题
- 【坑】javascript使用正则表达式验证数字的时候的画蛇添足
- linux下C语言中的flock函数用法 .
- [LeetCode] Palindrome Partitioning && Palindrome Partitioning II
- 托管代码和非托管代码
- 常见算法在实际项目中的应用
- linux grep命令详解
- 漫谈Java理念的转变与JVM的五大优势
- 函数指针和回调函数