【发布时间】:2015-02-03 15:19:22
【问题描述】:
所以我正在尝试新的材料设计(目前看起来很漂亮)。我在操作栏中实现了“设置”,并在资源文件中做了一个解决方法以使其工作:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowNoTitle">false</item>
<item name="android:windowActionBar">true</item>
</style>
突然,出现了一个带有 App 标题的黑色标题栏,黑色字体的标题(我是指带有 TimetableOrganizer 的那个,而不是带有 Vertretungsplan 的那个):
如何删除此标题栏?
【问题讨论】:
-
I implented a "settings" in the action bar??为什么你需要一个解决方法? -
how can I remove this title bar删除您的解决方法 -
点击设置时,出现空异常错误,奇怪的是添加
<item name="android:windowNoTitle">false</item> <item name="android:windowActionBar">true</item>这两个项目使错误消失..可能与API的一些不一致......但是这个标题栏出现:/ -
建议您尝试修复您的 NPE,而不是寻找解决方法。使用 AppCompat 时可能会混淆,并将 getSupportActionBar 与 getActionBar 混淆。
标签: android android-studio material-design