Home » Android » android – How to remove v7 toolbar back button

android – How to remove v7 toolbar back button

Posted by: admin June 15, 2020 Leave a comment

Questions:

I need to delete this v7 toolbar from my activity:

enter image description here

Please Help me !

How to&Answers:

If you are using v7 Toolbar you can remove this button with this code :

if (getSupportActionBar() != null) {
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(false);
}

you can read android here and here for more information. also this question may help