Reputation: 19
i use
buttonled1.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
in a function to change the color of a button. When i first call the function in onCreate() method it works just fine, and the button is created with the color i want.
But when i call in the activity the same function which changes the color of the button again, i have to touch the button to see the color changing.. somehow color changing happens when i want it, but to make it visible i have to touch the button.
Upvotes: 1
Views: 79