从Android的动作栏删除图标/标志 [英] Remove icon/logo from action bar on android

查看:197
本文介绍了从Android的动作栏删除图标/标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找到从操作栏,但我唯一所寻找所以一小时后,发现删除的图标/标识的一些方法,Android的文档和谷歌是如何删除整个标题栏。这不是我想要的。只想从标题栏删除图标/标志。

I've been trying to find some way of removing the icon/logo from the action bar but the only thing I've found after an hour of searching SO, Android's documentation and Google is how to remove the title bar in whole. That is not what I want. Only want to remove the icon/logo from the title bar.

任何一个知道如何做到这一点? preferably我想做到这一点的 XML

Any one know how to accomplish this? Preferably I'd like to do this in XML.

推荐答案

如果您已经定义安卓标识=...<应用> 标签的的Andr​​oidManifest.xml ,那么你需要使用这个东西要隐藏图标:

If you've defined android:logo="..." in the <application> tag of your AndroidManifest.xml, then you need to use this stuff to hide the icon:

<item name="logo">@android:color/transparent</item>

v11的和向上的主题

<item name="android:logo">@android:color/transparent</item>

使用这两种风格已经正确地隐藏操作栏图标上的2.3和我一个4.4的设备(该应用程序使用<一个href="https://developer.android.com/tools/support-library/features.html#v7-appcompat">AppCompat).

这篇关于从Android的动作栏删除图标/标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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