The first line of new text view is unnecessary
t=new TextView(this);
you can just do this
TextView t = (TextView)findViewById(R.id.TextView01);
as far as a background thread that sleeps here is an example, but I think there is a timer that would be better for this. here is a link to a good example using a timer instead
http://android-developers.blogspot.com/2007/11/stitch-in-time.html
Thread thr = new Thread(mTask);
thr.start();
}
Runnable mTask = new Runnable() {
public void run() {
// just sleep for 30 seconds.
try {
Thread.sleep(3000);
runOnUiThread(done);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
};
Runnable done = new Runnable() {
public void run() {
// t.setText("done");
}
};