如何删除标题和动作条福尔摩斯completetly图标? [英] How can I remove title and icon completetly in Actionbar sherlock?

查看:191
本文介绍了如何删除标题和动作条福尔摩斯completetly图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用行动吧福尔摩斯,但我需要从栏中删除标题和图标。

我用

  getSupportActionBar()setDisplayShowHomeEnabled(假)。
getSupportActionBar()setDisplayShowTitleEnabled(假)。
 

它的工作,图标和标题消失了,但还是老样子我的项目出现在右侧。有没有什么办法可以彻底清除标题和图标,而不是隐藏起来。我发现栈溢出了类似的问题,但没有人回答了这个问题。

修改

 在我的酒吧的样子: - 图标名称MenuItem1 MenuItem2--
     经过我吧的样子: -  MenuItem1 MenuItem2--
     我希望我的酒吧的样子: -  MenuItem1 MenuItem2
 

解决方案

您的菜单项绝对不会出现被左对齐。它们将被排列在右侧。左边是你的标题和图标(presently删除),导航(标签,列表等)。如果有足够的操作栏项,它们将流过到左侧,但它们将总是从右侧开始。这无法通过Android SDK的改变。

I use action bar Sherlock but I need to remove title and icon from bar.

I used

getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setDisplayShowTitleEnabled(false);

It worked, icon and title disappeared but stil my items appeared in right. Is there a any way to completely remove title and icon instead of hide them. I found a similar question in stack-overflow but nobody answered it.

Edit

     Before my bar look like:   -- Icon Title MenuItem1 MenuItem2--
     After my bar look like:    --            MenuItem1 MenuItem2--
     I want my bar look like:   -- MenuItem1 MenuItem2

解决方案

Your "menu items" will never appear be aligned to the left. They will be aligned to the right. The left is for your title and icon (presently removed) and navigation (tabs, list, etc.). If you have enough action bar items, they will flow over to the left side, but they will always start from the right. This cannot be altered via the Android SDK.

这篇关于如何删除标题和动作条福尔摩斯completetly图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆