Blank title in action bar

和自甴很熟 提交于 2019-12-22 03:57:02

问题


Is it possible to remove title bar which I think is ugly and doesn't fit in my application but still use actionbar? After I call

    requestWindowFeature(Window.FEATURE_NO_TITLE | Window.FEATURE_ACTION_BAR);

the title bar stays but piece of my view is gone(cant scroll up)

Is it possible to get rid of title bar but still keep actionbar, if I dont request it as window feature getActionBar() returns null everytime..


回答1:


Following Honeycomb, Action Bar was introduced to provide more functionalities, Well you can hide logo and title from it using this

ActionBar ab = getActionBar(); 
ab.setDisplayShowTitleEnabled(false); 
ab.setDisplayShowHomeEnabled(false);


来源:https://stackoverflow.com/questions/11493589/blank-title-in-action-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!