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

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -