Search code examples
androidtextviewupdating

Android updating text line by line in TextView


I am having a TextView to which I am outputting lines of text in a loop. But when I set the text even by appending to existing text it doesnt show till the loop has ended. Is there a way I can update a text view with text line by line

Thanks -Chandu


Solution

  • You have to run the loop to the ui thread or post a runnable with that code. Your code is locked in the loop and the textview cannot be invalidated