I am trying to set the background color of a button in my app and I am unable to achieve the result that I want...
The color that I am trying to set is holo_green_light(#ff99cc00)
. In order to do it, I am using setColorFilter(0xff99cc00, PorterDuff.Mode.MULTIPLY);
The color that I get is not the holo_green_light
but a mix of lightgrey and holo_green_light
.
I have tried using the LightingColorFilter
without much success.
Is there a way to do it programatically, so that the button appears like a button and not a flat rectangle with the color that I need.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…