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

javascript - How do you prevent nested queries/catches in sequelize? -

java - Could not retrieve pre-bound Hibernate session - Could not obtain transaction-synchronized Session for current thread -

ruby on rails - ActiveRecord order not working -