所以我知道有很多这些问题,但每次我尝试他们说的时候,我的应用似乎并没有删除标题栏。我也做了风格的改变:删除Android应用上的标题栏
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowNoTitle">true</item> <!-- This should work but it does not -->
</style>
我也曾尝试:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide(); //This guy here
setContentView(R.layout.activity_title);
上述工作,但我还是想用的标题栏需要的内容的空间,我的应用程序,这是为什么我希望能够修改XML代码而不是使用java。有什么建议么?
使用不包含ActionBar的主题。你的AppTheme有一个扩展DarkActionBar的父项。 –
并记录:设置android:windowNoTitle删除标题。但是如果你有其他东西,它不会删除操作栏。一个实例的菜单 – Zoe