navigation drawer - Android 5.1, ActionBarDrawerToggle not showing the arrow, worked with 5.0 with no code changes -


i use toolbar action bar, drawerlayout , actionbardrawertoggle. min , target sdk 21. @ point, working fine while device running 5.0.1 (api 21). other day, got 5.1 update , drawer toggle broke - arrow/hamburger icon not showing more. here code:

    setactionbar((toolbar) findviewbyid(r.id.toolbar));     drawerlayout = (drawerlayout) findviewbyid(r.id.drawer_layout);     drawertoggle = new actionbardrawertoggle(this, drawerlayout, r.string.action_open_drawer, r.string.action_close_drawer);     drawerlayout.setdrawerlistener(drawertoggle); 

i have drawertoggle.syncstate() in onpostcreate().

since i've updated min , target 22, along compile , build tools 22 , 22.0.1 respectively, , support libs use 22.0.0, , nothing helped.

any ideas?

so managed hamburger/arrow icon work again. did add magic line:

getactionbar().setdisplayhomeasupenabled(true); 

why works have no idea. seems not make sense, hamburger has nothing drawer toggle. or it?


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -