I have created an app composed of one single activity which include a single TextView. Here is the XML of my activity :
TextView
activity_main.xml>
You need to perform
text.setText("test");
in UI thread. You can do so using Handlers.
final Handler myHandler = new Handler(); myHandler.post(myRunnable); final Runnable myRunnable = new Runnable() { public void run() { text.setText("test"); } };