[Android] Set Text Color for TextView Android

Public on May 28, 2014
In the string.xml file use the following tag
 <string name="CodeColor" >"#0000ff"</string>
In the layout files you can call to the colors or styles:
android:textColor="@color/titlecolor"
Or you can use:

You can use
  textView1.setTextColor(getResources().getColor(R.color.mycolor))
or
  textview1.setBackgroundColor(Color.parseColor("#ffffff"));
or
    textview1.setBackgroundColor(Color.RED);
or
    textView1.setBackgroundColor(R.color.black);




[Advertising]Faster Thinking - Speed up your brain


Faster Thinking Game



sentiment_satisfied Emoticon