android - action bar icon keep showing back icon -


i'm literally new in developing android apps. project using navigation drawer between fragments. tried custom drawer tutorial http://www.tutecentral.com/android-custom-navigation-drawer/ , got error. in application, in action bar, keeps showing icon instead default icon.

this url before-after image of actionbar : http://oi58.tinypic.com/2ahsbys.jpg

here code i'm confused of (pretty same tutorial, tell me if there's missed)

    getsupportactionbar().setdisplayhomeasupenabled(true);     getsupportactionbar().sethomebuttonenabled(true);      mdrawertoggle = new actionbardrawertoggle(this, mdrawerlayout,             r.drawable.ic_drawer, r.string.navigation_drawer_open,             r.string.navigation_drawer_close) {         public void ondrawerclosed(view view) {             getsupportactionbar().settitle(mtitle);             invalidateoptionsmenu(); // creates call             // onprepareoptionsmenu()         }          public void ondraweropened(view drawerview) {             getsupportactionbar().settitle(mdrawertitle);             invalidateoptionsmenu(); // creates call             // onprepareoptionsmenu()         }     }; 

if delete setdisplayhomeasupenabled, icon gone can't click somewhere display drawer, have slide it. please refer me if has solved it. many thanks.

*i have changed r.drawable.ic_drawer other drawable icons had no effects.

try setting theme activity in manifest file , inside styles.xml set drawable homeasupindicator theme

<style name="customtheme" parent="@style/widget.appcompat.actionbar">       <item name="homeasupindicator">@drawable/ic_drawer</item>  </style> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -