开发者

Restore the original color after clicking on image button android

开发者 https://www.devze.com 2023-03-14 04:01 出处:网络
I have mentioned the following in the onClick() method: Ibutton1.setColorFilter(Color.argb(150, 155, 155, 155));// this gives the button a gray tint when t开发者_JAVA技巧he button is clicked. where Ib

I have mentioned the following in the onClick() method: Ibutton1.setColorFilter(Color.argb(150, 155, 155, 155));// this gives the button a gray tint when t开发者_JAVA技巧he button is clicked. where Ibutton1 is the instance of Imagebutton

Now I want that the tint should be removed after the button has been clicked and the activity has been started... Plz help


You can always use a selector for this.Check the same in the link below:

http://developer.android.com/resources/tutorials/views/hello-formstuff.html

Thanks!


try using lbutton1.clearColorFilter() function on the desired event.

0

精彩评论

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

关注公众号