android - How can I get more than one 'tab' character in my textview? -


i'm trying display log file in textview, tab characters have in file aren't displaying properly.

spannablestringbuilder span = new spannablestringbuilder(text); span.setspan(new tabstopspan.standard(600), 0, span.length(), spanned.span_exclusive_exclusive );   ((textview) findviewbyid(r.id.logtext)).settext(span, textview.buffertype.spannable); 

what happens first tab in line displays properly, subsequent tabs show spaces. have tried replacing '\t' \u0009 still didn't work. have tried changing tab span, wasn't successful.

you need set them all:

for (int = 0; < 1000; += 100)     span.setspan(new tabstopspan.standard(i), 0, span.length(), spanned.span_exclusive_exclusive); 

Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

android - Linear layout children not scrolling -