I'm trying change the color of my back button programmatically during the animation of a collapsing toolbar. I want it to be fully white when its expanded, and have the app default back button color when collapsed which is a color with alpha (black at 50%).
All of the examples I've found for setting icon color suggest to use
setColorFilter(color, PorterDuff.Mode.SRC_ATOP)
problem is, this respects the destination alpha which is 50%, and when I when I'm in expanded mode and try to set the color to solid white, it actually comes out to white with 50% alpha.
Which PorterDuff mode behaves exactly like SRC_ATOP
BUT IGNORES ALPHA?
from Porter Duff mode that ignores Alpha and covers dest
No comments:
Post a Comment