1

I want to change the default home up button Icon of Action Bar in API Level 22

I am using AppCompatV7 for API Level 22 and I am extending ActionBar Activity.

Currently it looks like

default
and want to change it as

Required

What we have done:

In my default theme style I wrote following code

<item name="android:actionModeCloseDrawable">@drawable/up_button</item>

but it does not seems to work.

Dhaval Parmar
  • 18,632
  • 8
  • 83
  • 173
techierishi
  • 413
  • 3
  • 14

2 Answers2

4

I have done like this. it may help others.!!

mDrawerToggle.setDrawerIndicatorEnabled(false);//set false default

toolbar.setNavigationIcon(R.drawable.menu_icon);//add custom home buton

     toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mDrawerLayout.openDrawer(Gravity.START);
        }
    });
Kishore Jethava
  • 6,322
  • 5
  • 30
  • 49
-1

I think that the attribute of the up button in the theme is called homeAsUpIndicator:

<item name="android:homeAsUpIndicator">@drawable/up_button</item>

More info and posible solutions on this question

Hope it helps

Community
  • 1
  • 1
sabadow
  • 5,064
  • 3
  • 33
  • 51