Take a look at the OpenGL API Demo source examples. I think it's called Kube or someting. It provides a Game-thread that is set up to receive messages which then can be executed synchronously on the game-thread (posting Runnables on a queue that is managed by the Game-thread).
On May 21, 3:54 am, "[email protected]" <[email protected]> wrote: > Hi All > > I am writing an application in which i need to handle messages between > the main thread(the deafult UI related thread) and the user created > Gamethread. > > The requirement is like this. > > An activity(say "Activity_X") is setting the view by "setContentView > (some "View_Y")". In "Activity_X" i have implemeted > "onCreateOptionsMenu()" and "onOptionsItemSelected()" fucntions for > creating menus & a switch case for action to be taken on selecting > those menus.Menu has items like "resume/pause/zoom/" . > > All action to be take on selecting these menus are implemented in > "View_Y" in a separate Gamethread by extending "Thread" class. > > So whenever a menu is selected in "Activity_X" i need to send a > message to "View_Y". And on receiving this ,a particular action/method > should be called in View_Y(GameThread). > > How can i achieve this using Handlers?Is there any other way of doing > this? Please do share with me some code snippets for these. > Your advises are highly appreciable. Thank you for your time. > > -Latha --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

