How do I change the color of the Back Button (or Up button ) from my Toolbar? When I run the application it appears black.
How do I change the color of the Back Button (or Up button ) from my Toolbar? When I run the application it appears black.
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.
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>