Reputation: 1944
I am using ActionBarSherlock on my simple app and would like to hide the HOME button if the user is on the home/main activity. I understand how to do so with the setHomeButtonEnabled(false), however, I am extending a class that contains my navigation and has setHomeButtonEnabled(true) and I cannot seem to overwrite that setting in my main activity.
Thanks to @andy I am able to get rid of the icon, however, I cannot get rid of the < arrow. Any ideas?
Thanks for any help.
Upvotes: 4
Views: 5160
Reputation: 1944
The only way I have found to do this is to not have this set on your baseActivity:
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
and then set it as you will for each activity that requires the menu:
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
or
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
Upvotes: 0
Reputation: 2409
With ActionBarSherlock just put this in your home/main activity onCreate() method:
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowHomeEnabled(false);
Upvotes: 7
Reputation: 4411
Get the home button view and apply this
mHomeButton.setVisibility(View.INVISIBLE);
Upvotes: -1