Android:java.lang.IllegalArgumentException:未知颜色 [英] Android: java.lang.IllegalArgumentException: Unknown color
本文介绍了Android:java.lang.IllegalArgumentException:未知颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试运行以下代码时出现上述错误:
I'm getting the above error when I try to run the following code:
int colourInt = Color.parseColor(colour.getHexValue());
有问题的十六进制值为ee3090b0
.有没有办法将彩色十六进制值转换为等效的整数并仍然保留alpha值?
我已尝试遵循此 post 中的建议,但这不起作用...
The offending hexadecimal value is ee3090b0
. Is there a way I can convert a colour hexdecimal value to its integer equivalent and still retain the alpha value?
I've tried following a suggestion made in this post, but it isn't working...
推荐答案
查看全文