如何返回到EditText的原始背景颜色
嗨,我有一个编辑文本,我想将背景图更改为原始颜色。
这样,我正在变成红色,但想返回原始颜色,我该怎么做,请
etCostLimit.backgroundTintList = ColorStateList.valueOf(resources.getColor(
R.color.newRed,
null))
提前谢谢 r
Hi I have an edit text and I want to change the backgroundtint to the original color.
this way I am changing to the red colour but want to return to the original colour, how can I do that please
etCostLimit.backgroundTintList = ColorStateList.valueOf(resources.getColor(
R.color.newRed,
null))
Thanks in advance
R
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试了所有内容后,我终于在C#论坛上找到了答案。将其转换为Kotlin并组合其他部分,这是结果(在API 21和33上进行了验证):
将Edittext视为变量名称。
备份:
还原:
After trying everything, I finally found the answer on a C# forum. Converted that to Kotlin and combining other parts, here's the result (verified on API 21 and 33):
Consider editText as the variable name.
Backup:
Restore: