Android thread not working
问题 In this code snippet, the application sleeps for the interval, but instead of appending TEXT to textStatus(TextView variable), it displays an error that Something went wrong and application is closing. Thread time_manager = new Thread(){ public void run(){ int interval = 2000; try{ sleep(interval); textStatus.append("\nTEXT\n"); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ } } }; What part am I doing wrongly? 回答1: To update the UI you