简体   繁体   English

如何在操作栏中隐藏应用标题

[英]How to hide app title in action bar

i have an action bar scherlock where i want to show logo without app title. 我有一个操作栏scherlock,我想在其中显示不带应用程序标题的徽标。 I've just added in manifest android:logo tag and some code getSupportActionBar().setDisplayShowTitleEnabled(false) in my activity thats hide my title. 我刚刚在我的活动中添加了清单清单android:logo标记和一些代码getSupportActionBar()。setDisplayShowTitleEnabled(false) ,这隐藏了我的标题。 It seems to work fine, but when app was started a title displays in a few seconds, how i can resolve this? 它似乎工作正常,但是当应用启动时,标题会在几秒钟后显示,我该如何解决呢?

just try this in order to hide title bar. 只需尝试此操作即可隐藏标题栏。

Use this in styles.xml file 在styles.xml文件中使用它

<style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">

I suggest use custom title bar. 我建议使用自定义标题栏。
you can customize it as you like. 您可以根据需要自定义它。
example

but use 45dip instead of 35dip 但是使用45dip而不是35dip

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

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