Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spannable string in android java for color

String text2 = text + CepVizyon.getPhoneCode() + "

"
            + getText(R.string.currentversion) + CepVizyon.getLicenseText();

Spannable spannable = new SpannableString(text2);

spannable.setSpan(new ForegroundColorSpan(Color.WHITE), text.length(), (text + CepVizyon.getPhoneCode()).length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

myTextView.setText(spannable, TextView.BufferType.SPANNABLE);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spannable #string #android #java #color
ADD COMMENT
Topic
Name
2+8 =