Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
 
PREVIOUS NEXT
Tagged: #give #text #color #font #size #android #string
ADD COMMENT
Topic
Name
6+6 =