jojois74
0
Q:

spannable string for multiple places same string

SimpleSpanBuilder ssbTest = new SimpleSpanBuilder();

ssbTest.append("Green",new ForegroundColorSpan(Color.GREEN));
ssbTest.append("Black",new ForegroundColorSpan(Color.BLACK));
ssbTest.append("Blue",new ForegroundColorSpan(Color.BLUE));
ssbTest.append("Red",new ForegroundColorSpan(Color.RED));

ssbTest.append("Green",new ForegroundColorSpan(Color.GREEN));
ssbTest.append("Black",new ForegroundColorSpan(Color.BLACK));
ssbTest.append("Blue",new ForegroundColorSpan(Color.BLUE));
ssbTest.append("Red",new ForegroundColorSpan(Color.RED));


textView.setText(ssbTest.build());
0

New to Communities?

Join the community