我尝试了所有这3种方法,但仍无法删除标题栏。无法删除android中的标题栏
此方法删除在androidstudio(1.4)的标题栏,但我仍然可以看到标题栏在模拟器:
编辑(如何解决):它会工作,如果你继承而不是应用程序的活动在java文件中compat。
我尝试了所有这3种方法,但仍无法删除标题栏。无法删除android中的标题栏
此方法删除在androidstudio(1.4)的标题栏,但我仍然可以看到标题栏在模拟器:
编辑(如何解决):它会工作,如果你继承而不是应用程序的活动在java文件中compat。
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.NoActionBar">
<!-- API 11 theme customizations can go here. -->
</style>
在所有styles.xml文件中发布此行。
仍然无法正常工作。该应用程序崩溃。 – hp7
在这里发布您的错误日志 –
更改styles.xml到
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
和清单:
改变你的活动主题:
<activity
android:theme="@styles/AppTheme
....
仍然无法正常工作,它崩溃的应用程序 – hp7
你可以发布你的logcat在这里 –
使用自定义主题;
<style name="CustomTheme" parent="Theme.Holo.Light.NoActionBar">
<!-- Customize your theme here. -->
</style>
,并将其应用在你的清单
<application
android:theme="@styles/CustomTheme"
或者直接使用它作为:
<application
android:theme="Theme.Holo.Light.NoActionBar"
尝试在styles.xml把这个
<!--
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. -->
</style>
和应用的主题,以您的应用程序
发表您的所有文件styles.xml这里的截图能 –
你发布你的崩溃的堆栈跟踪?如果您使用的是AppCompat,那么您的应用程序主题必须从AppCompat主题继承。 – curtisLoew
爱你兄弟!它工作,如果我继承活动,而不是appcompat.Thanks curtisLoew – hp7