In your code, the main thread still running when you trigger a new thread to run in background
obviously, you will see result of last setText call as "Process Success" you should callback main thread to reset status after your thread finished. On Aug 2, 2:31 pm, Arun <[email protected]> wrote: > I've a button on my screen, that triggers a backend process that takes > 15 secs. I would like to tell the user to wait for 15 secs when they > click, and update the status after the processing is done. > > In order to achieve this, in my button OnClick method, I am doing the > following: > TextView tv = (TextView) getTextViewById(); > > tv.setText("Processing kicked off... Please wait for 15 secs"); > tv.invalidate(); > //call processor > tv.setText("Process Success"); > > But, in reality, all I see is the result of last setText call. No > intermediate updates are shown on the screen. Is invalidate the right > method to display the message? Should I be calling something else? > > Thanks in advance for your help! > Arun. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

