This code is just wrong: you are starting a new thread just to run code back on the UI thread. All your code amounts to doing nothing but run the content of the run() method. Even worse, if holdGame(3000) triggers a thread sleep, you are blocking the UI thread.
On Thu, May 14, 2009 at 2:59 AM, Sukitha Udugamasooriya <[email protected]> wrote: > > Yeahh.. I found out.. > > runOnUiThread() is the solution.... > > Thread t = new Thread() { > public void run() { > f.runOnUiThread(new Runnable() { > �...@override > public void run() { > holdGame(3000); > > setContentView(R.layout.game_end_menu); > initGameOver(); > } > }); > } > }; > t.start(); > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

