在活动Android中删除默认工具栏 [英] Removing the default toolbar in an activity android
本文介绍了在活动Android中删除默认工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在升级到 android 3.1
之前.我通常只是将主题更改为主题.应用紧凑. NoTitleBar
,但是新版本的 android studio
识别错误.我通过在开头添加基数来解决此问题.但是我似乎可以找到有关支持删除自定义栏的样式主题的任何答案.
Before upgrading to android 3.1
.I usually just change the theme to a theme. app compact. NoTitleBar
but the new version of android studio
is having errors recognizing it.I solved this problem by adding base to the beginning. But I can seem to find any answer regarding a style theme that supports removing the custom bar.
推荐答案
Add this style in style file . where other styles are mentioned .
<!-- Base application theme. -->
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimaryDark</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimaryDark</item>
<item name="android:statusBarColor">@color/lightgreycolor</item>
</style>
这篇关于在活动Android中删除默认工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文