Remove application icon and title from Honeycomb action bar

后端 未结 8 1945
北恋
北恋 2020-11-27 12:10

How can I remove the application icon & title which comes by default in an action bar?

There is a similar question here: Can i hide the App Icon from the Action

相关标签:
8条回答
  • 2020-11-27 12:34

    Try this in onCreate()

    ActionBar actionbar=getSupportActionBar();
    actionbar.setDisplayHomeAsUpEnabled(false);
    actionbar.setIcon(android.R.color.transparent);
    

    user android.R.color.transparent

    0 讨论(0)
  • 2020-11-27 12:40

    If you are looking to simply remove the entire actiobar, you can try the hide method for actionBars:

    getActionbar().hide();
    
    0 讨论(0)
提交回复
热议问题