TextView TextView = null;//The first type: Use the system's own color to set, such as: Textview.settextcolor (Android.graphics.Color.BLUE); The second kind: 0XFFFF00FF is the int type of data, grouping the 0x|ff|ff00ff,0x is the mark that represents the color integer, FF is the transparency, the FF00FF represents the color, note: Here FFFF00FF must be 8 color representation, Do not accept the ff00ff of this 6 color representation, such as: Textview.settextcolor (0XFFFF00FF);//Third: The use of the color class, such as: Textview.settextcolor ( Android.graphics.Color.parseColor ("#87CEFA"));//Fourth://through the acquisition of resource files to set up. Depending on the situation r.color.red can also be r.string.red or r.drawable.red,//of course, the premise is to do the corresponding configuration file in the corresponding configuration, such as (XML tag)://<color name= "Red" > #FF0000 </color>//<drawable name= "Red" > #FF0000 </drawable>//<string name= "Red" > #FF0000 < /string>//such as: Textview.settextcolor (Android.graphics.Color.parseColor ("#87CEFA"));
TextView Setting Font Color