开发者

How to set ImageView to chang color of foreground when click?

I want to call image from s开发者_运维技巧erver and I use image in background of imageview when I click on button it will change foreground color of imageview to black (still show image but darker)

How to do this ?


try this code:

image.setColorFilter(Color.rgb(123,73,122), android.graphics.PorterDuff.Mode.MULTIPLY );

Found this from http://suryaandriodapps.blogspot.com/2011/12/apply-color-to-imageview-png-file.html?zx=e251678f0452e874 and worked for me..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜