setBackgroundColor()只需要注意.我真的不知道int等于什么颜色.有没有一种简单的方法可以将#2222FF运行时的字符串转换为int?
Paint.setColor期待一个整数.但我拥有的是一个Color对象.我color.getIntValue()在Java 中看不到?那我该怎么做?我想要的是类似的东西
public Something myMethod(Color rgb){
myPaint.setColor(rgb.getIntValue());
...
}
Run Code Online (Sandbox Code Playgroud)
更正:android.graphics.Color;我认为有android一个标签就足够了.但显然不是.
对于给定的TextView,如何获取Alpha,Red,Green和Blue值(0-255)?
我知道如何设置TextView.SetBackgroundColor(Color.argb(a_int,r_int,g_int,b_int));
但是如何获得?
非常感谢