如何将按钮的背景色重置为默认值? [英] How to reset a button's background color to default?
本文介绍了如何将按钮的背景色重置为默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我读了几篇文章,但没有一篇提供有效的解决方案.
I read a couple of posts but none of them had the working solution.
一旦您完成
button.setBackgroundColor(0x00000000);
如何将按钮的背景色恢复为默认颜色?
How do you revert the button's background color back to default color?
推荐答案
使用:
btn.setBackgroundResource(android.R.drawable.btn_default);
这篇关于如何将按钮的背景色重置为默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文