I am setting the back arrow of the action bar and changing its color like so:
final Drawable upArrow = getResources().getDrawable(R.drawable.ic_action_navigation_arrow_back);
upArrow.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);
getSupportActionBar().setHomeAsUpIndicator(upArrow);
And as you can see, I am changing the color of the arrow in this line because the default returned arrow is gray, here:
upArrow.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);
And the color is changing but the problem that it is a bit transparent although the color white
that I am providing has the following hex code #FFFFFFFF
.
Here are two images that will make my point clear.
This is how it looks:
While the color should like this other component:
And I tried all the options that are under PorterDuff.Mode.XXXX
but none worked.