How do you update the screen after you change the text with a setText?
问题 Right now I am using the following code to update a TextView txtMain.setText("new text"); After that code executes, the screen does not update with the new text. Is there a way I can force the text to update right then and there? 回答1: After that code executes, the screen does not update with the new text It should, once you return control to Android. Suppose, for example, you tried doing a Thread.sleep(5000); immediately after the setText() call. The text will not appear on the screen,