android: how to remove the back/home button in the action bar

后端 未结 9 1557
一向
一向 2020-12-29 02:20

I am having difficulties trying to remove the back/home button from the action bar.

 getActionBar().setDisplayShowHomeEnabled(false);   //disable back button         


        
9条回答
  •  独厮守ぢ
    2020-12-29 02:59

    ElectronicGeeks answer is correct.

    For API lower than 11, Use:

    getSupportActionBar().setDisplayHomeAsUpEnabled(false);

提交回复
热议问题