I have a span like this:
private SpannableStringBuilder spandex(List<String> ret, Boolean startDark) {
SpannableStringBuilder spanBuilder = new SpannableStringBuilder();
Spannable span = null;
int color = 0;
int startDarkMod = 0;
if(startDark)
startDarkMod = 1;
for (String x : ret) {
if ((ret.indexOf(x) + startDarkMod) % 2 > 0)
color = WzTheme.NOT_HIGHLIGHTED_COLOR;
else
color = WzTheme.ALT_NOT_HIGHLIGHTED_COLOR;
span = new SpannableString(x.toUpperCase());
span.setSpan(new ForegroundColorSpan(color),
0,
x.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spanBuilder.append(span);
}
return spanBuilder;
}
public static int NOT_HIGHLIGHTED_COLOR = Color.rgb(68, 68, 68);
public static int ALT_NOT_HIGHLIGHTED_COLOR = Color.rgb(110, 110, 110);
It produces light gray and dark grey code like this:
Then there is that bright white "T". It happens after every ? character, which, as the other thread mentioned, gets converted to SS when capitalized. I would prefer no capatalization of that char, but I can live with the conversion to SS. What I need to stop from happening is the big white "T". Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…