How Can we hide title bar while using action bar?

前端 未结 10 1992
闹比i
闹比i 2021-02-12 14:43

I\'m using ActionBarSherlock and I\'m trying to hide the title bar of my application but whenever I do that, I get a NullPointerException when accessing the A

10条回答
  •  既然无缘
    2021-02-12 15:17

    I hide the title bar by adding the following lines of code:

    getSupportActionBar().setDisplayShowTitleEnabled(false);
    getSupportActionBar().setDisplayShowHomeEnabled(false);
    

    hope this helps :)

提交回复
热议问题