Remove application icon and title from Honeycomb action bar

后端 未结 8 2006
北恋
北恋 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:30

    Try this combination

        getSupportActionBar().setHomeButtonEnabled(false);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(false);
        getSupportActionBar().setIcon(R.color.transparent);
        getSupportActionBar().setDisplayShowTitleEnabled(true)
    

提交回复
热议问题