简体   繁体   English

如何删除导航抽屉图标

[英]How to remove Navigation drawer icon

How to remove pointed icon in Navigation Drawer, I just playing with Navigation Drawer, I just wanted to maintain only one icon. 如何删除导航抽屉中的尖头图标,我只是使用导航抽屉,我只想维护一个图标。 在此输入图像描述

I had same issue and I solved with adding this line in onCreate() : 我有同样的问题,我解决了在onCreate()添加这一行:

getActionBar().setDisplayHomeAsUpEnabled(false);

it will hide icon from navigation drawer. 它会隐藏导航抽屉中的图标。

Which implementation are you using for the Navigation Drawer? 您使用哪种实现导航抽屉?

Also, why do you want to remove it? 另外,你为什么要删除它? You could keep the icon there and use an actual icon instead of one trying to show that it is a menu next to your "Home" text. 您可以将图标保留在那里并使用实际图标,而不是试图显示它是“主页”文本旁边的菜单。

Is it a bit too late for answer? 回答有点太迟了吗?

1 way to remove the 3 stripes from the app is 从应用程序中删除3条纹的1种方法是

replace the ic_drawer.png in every drawable folder with nothing (eg. with transparent icon) 用任何东西替换每个可绘制文件夹中的ic_drawer.png (例如,用透明图标)

You also can replace with any icon you want too. 您也可以替换任何您想要的图标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM