setBackgroundColor() 只接受整数。我不知道什么整数代表什么颜色。有没有简单的方法在运行时将像 #2222FF 这样的字符串转换为一个 int?
setBackgroundColor()
#2222FF
int
int color = Color.parseColor("#2222FF");