settextcolor () parameter setting methodCategory: Android interface research 2011-12-09 23:27 11160 people read reviews (2) favorite reports
Check the information. The parameters of SetTextColor () should be written in this form:
SetTextColor (0XFF0000FF);//0xff0000ff is the data of type int, group the 0x| Ff|0000ff,0x is a marker that represents a color integer, FF is a representation of transparency, 0000FF is a color, note: Here 0xff0000ff must be a color representation of 8, do not accept 0000FF as a color representation of this 6.
In addition, you can also use the system's own color class
SetTextColor (Android.graphics.Color.BLUE);
There is also the use of resource files to set up
SetTextColor (This.getresources (). GetColor (R.color.blue));//set by obtaining a resource file. Depending on the situation r.color.blue can also be r.string.blue or r.drawable.blue, of course, if necessary in the corresponding configuration file to do the corresponding configuration, such as:
<color name= "Blue" > #0000FF </color>
<drawable name= "Blue" > #0000FF </drawable>
<string name= "Blue" > #0000FF </string>
Excerpt from: http://blog.csdn.net/chiuan/article/details/7058686
(turn) SetTextColor () parameter setting method