If you are just trying to add text to the view so that it displays
"Step One: blast egg Step Two: fry egg" Then consider using
t.appendText("Step Two: fry egg"); instead of t.setText("Step Two:
fry egg");
If you want to completely change what is in the text view so that it
says "Step One: blast egg" on startup and then it says "Step Two: fry
egg" at a time later you can always use a handler+runnable as
discussed or add a button or something and catch its event and then
make a new call to "setText"
Good luck
---snctln
www.snctln.com
On Feb 19, 4:48 pm, Michael Lam <[email protected]> wrote:
> hi,
>
> i tried to do this:
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
>
> setContentView(R.layout.main);
>
> t=new TextView(this);
>
> t=(TextView)findViewById(R.id.TextView01);
> t.setText("Step One: blast egg");
>
> try {
> Thread.sleep(10000);
> } catch (InterruptedException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
> t.setText("Step Two: fry egg");
>
> but for some reason, only the second text shows up when i run it. i
> think it might have
>
> something to do with the Thread.sleep() method blocking. so can
> someone show me how to
>
> implement a timer "asynchronously"?
>
> thanks.
--
You received this message because you are subscribed to the Google Groups
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/android-discuss?hl=en.