Answers for "how to set font color in android"

4

change color of text in textview android

TextView text = (TextView) findViewById(R.id.text);
text.setTextColor(Color.parseColor("#FFFFFF"));
Posted by: Guest on August-20-2020
0

give text color and font size in android string

TextView tv = new TextView(this);
String string= "Hello";
String title="MyTitle";
SpannableString ss1=  new SpannableString(string);
ss1.setSpan(new RelativeSizeSpan(2f), 0, ss1.length(), 0);
tv.append(ss1);
tv.append(title);
setContentView(tv);
Posted by: Guest on February-16-2021

Code answers related to "how to set font color in android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language