简体   繁体   English

如何使用主题在Android中隐藏操作栏图标?

[英]How do I hide the action bar icon in Android using a theme?

While I do know that you can hide the icon in the action bar by using setDisplayUseLogoEnabled, this takes a while and will result in the icon flashing for a second. 虽然我确实知道您可以使用setDisplayUseLogoEnabled将图标隐藏在操作栏中,但这会花费一些时间,并且会导致图标闪烁一秒钟。 Is there a way to avoid this by using themes or any other solution? 有没有办法通过使用主题或任何其他解决方案来避免这种情况?

尝试使用getActionBar()。setDisplayOptions(ActionBar.DISPLAY_USE_LOGO)

assuming you're after a full screen view, try looking at the 假设您要全屏查看,请尝试查看

WindowManager.LayoutParams.FLAG_FULLSCREEN

flag in the Window class Window类中的标志

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

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