I have a menu, with 3 buttons, and I need to change their color dynamically in code.
I'm currently doing this:
mDrawable.setColorFilter (0xff0099cc, PorterDuff.Mode.SRC_IN);
What happens is that it correctly applies the color button, but when I change the activity and click on another button, the first button that is activated always has the color as if it was still activated. * This menu is included in the three activities.
In the image below it represents what happens, when I click on another button, it activates the other one but the first one remains with the color still.