0
How I change the color of Back Button (or Button up) of my Toolbar ? When I run the application it appears black.
0
How I change the color of Back Button (or Button up) of my Toolbar ? When I run the application it appears black.
2
I believe there’s no way to change his color, but to use another image instead since he’s a drawable
. For this create an image of your preference (with the color you want) and add in the folder /drawable
of your project, done this just add this line in the theme(it gets in the folder /style
) of your app:
<item name="android:homeAsUpIndicator">@drawable/minha_imagem</item>
0
Fala Vinicius,
It’s good you always post the code you’re using, to avoid being negative!
Suppose you are declaring your Toolbar in this way:
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.
thank you, it worked perfectly.
Browser other questions tagged android android-layout
You are not signed in. Login or sign up in order to post.
Is not a back button but rather a Button up , despite the design.
– Pablo Almeida
@Pabloalmeida, because he did not change the text to the correct name?
– Marco Souza
@Dotnet Because many people should search with this name. Probably more than with "Up". But the idea is good. I will edit to leave the two terms. :)
– Pablo Almeida