Change Toolbar Back Button Color

0

How do I change the color of the Back Button (or Up button ) from my Toolbar? When I run the application it appears black.

    
asked by anonymous 07.06.2016 / 20:31

2 answers

0

Talk Vinicius,

You should always post the code you are using, to avoid being denied!

Let's say you're declaring your toolbar, like this:

Toolbar mToolbar = (Toolbar) findViewById(R.id.toolbar);

So you can change the backbutton image, like this:

mToolbar.setNavigationIcon(R.drawable.ic_arrow_back_grey600_24dp);
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

Hugs.

    
07.06.2016 / 20:40
2

I think you can not change the color of it, but use another image in place since it is a drawable . To do this, create an image of your preference (with the color you want) and add it in the /drawable folder of your project, done just add that line in the theme (it is in the /style folder) of your application:

<item name="android:homeAsUpIndicator">@drawable/minha_imagem</item>
    
07.06.2016 / 20:38