Here is another problem that a lot of us have faced : Changing the ActionBar Icon when using "android.support.v7.app.ActionBarDrawerToggle" instead of the deprecated "android.support.v4.app.ActionBarDrawerToggle"
After a lot of researches and readings here is the solution for anyone who needs it.
In your :
Call :
So you have something like this :
And that's it again.
After a lot of researches and readings here is the solution for anyone who needs it.
In your :
1 2 3 | @Override protected void onCreate(Bundle savedInstanceState) { } |
Call :
1 2 3 | getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_drawer); |
So you have something like this :
1 2 3 4 5 6 | @Override protected void onCreate(Bundle savedInstanceState) { getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_drawer); } |
And that's it again.
searched the net ,nothing else seemed to work
ReplyDeleteso this is fabulous , thanks