颜色可以用四个字节0xAARRGGBB
AA 透明度,00-完全透明 ff不透明
RR Red
GG Green
BB Blue
比如不透明的红色, 0xffff0000
textView.setTextColor(0xff0000ff);
系统定义的颜色
textView.setTextColor(android.graphics.Color.RED);
在xml里直接写上
android:textColor="#ff00ff00"
自定义颜色
颜色可以用四个字节0xAARRGGBB
AA 透明度,00-完全透明 ff不透明
RR Red
GG Green
BB Blue
比如不透明的红色, 0xffff0000
textView.setTextColor(0xff0000ff);
系统定义的颜色
textView.setTextColor(android.graphics.Color.RED);
在xml里直接写上
android:textColor="#ff00ff00"
自定义颜色