android点击图片按钮后恢复原来的颜色
我在 onClick() 方法中提到了以下内容: Ibutton1.setColorFilter(Color.argb(150, 155, 155, 155));
// 单击按钮时,按钮会呈现灰色。其中 Ibutton1 是 Imagebutton 的实例
现在我希望在单击按钮并启动活动后应删除色调... 请帮忙
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 the 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您始终可以为此使用选择器。在下面的链接中检查相同的内容:
http://developer.android.com/resources/tutorials/views/hello-formstuff.html
谢谢!
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!
尝试在所需事件上使用
lbutton1.clearColorFilter()
函数。try using
lbutton1.clearColorFilter()
function on the desired event.