I want to change ActionBar Indicator(the left arrow) and don't want to display the logo so i setDisplayShowHomeEnabled(false) to make the logo is invisiable, and setHomeAsUpIndicator(my image) to change the indicator, but it doesn't work
Asked
Active
Viewed 1,117 times
2 Answers
3
One way is to not call setDisplayShowHomeEnabled(false)
. Instead use findViewById()
to get the home View, and directly set it to GONE
.
View homeView = findViewById(android.R.id.home);
homeView.setVisibility(View.GONE);

Mike M.
- 38,532
- 8
- 99
- 95
-
When using support v7 library revision 21 it just doesn't work - `findViewById(android.R.id.home)` always returns null as I can see – sberezin Feb 07 '15 at 15:15
-
1@sberezin Apologies. In reviewing my inbox, I just realized I'd not seen your message. When using that support library, you might be using the `Toolbar` class, instead of an `ActionBar`. I would direct you to [my answer here](http://stackoverflow.com/questions/28279953/get-reference-to-drawer-toggle-in-support-actionbar/28280347#28280347) for a general sense of what's happening. I hope it'll give you an idea of how to proceed in your circumstance. – Mike M. Feb 14 '15 at 02:46
0
Why don't you do this in your Manifest.xml
file
android:logo=@null
or android:icon=@null

Biu
- 1,066
- 10
- 18