删除工具栏actionBar

时间:2015-06-29 17:54:52

标签: android android-actionbar android-toolbar

我在片段中遇到了工具栏动作栏的麻烦。我知道我可以使用

隐藏它
ActionBar actionBar = ((AppCompatActivity)getActivity()).getSupportActionBar();
actionBar.hide();

但是我想完全删除它,因为如果我使用上面的代码,它会留下一个空白区域。 (我'发布图片以显示结果,但我不能,因为我还没有名声)

谢谢!

1 个答案:

答案 0 :(得分:0)

因为你设置了

XMLHttpRequest cannot load http://localhost/socket.io/?EIO=3&transport=polling&t=1435600202687-6. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access. The response had HTTP status code 404.

ng-model="$parent.jumpDate" 与android中的任何其他视图一样,因此您可以隐藏工具栏

Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
    setSupportActionBar(toolbar);

使用Style

Toolbar