android - ActionBar icon is not showing if setDisplayHomeEnabled is false -


i want set icon on actionbar. when have setdisplayshowhomeenabled set true icon shows, when false - nothing. don't want show button on actionbar, icon. what's problem?

            actionbar.settitle("");             actionbar.setdisplayshowcustomenabled(true);             actionbar.setdisplayshowhomeenabled(true);             actionbar.setdisplayshowtitleenabled(true);             actionbar.seticon(getresources().getdrawable(r.drawable.logo_big)); 

for button write code:

actionbar.setdisplayshowhomeenabled(true); actionbar.setdisplayhomeasupenable(false); 

its bydefault false though, in case if showing have false programatically.

you have use getsupportactionbar()instead of actionbar() object.


Comments

Popular posts from this blog

How to use SUM() in MySQL for calculated values -

loops - Spock: How to use test data with @Stepwise -