Interesting indeed that it freezes. Could you copy-paste the "adb logcat" output?
Furthermore, you might wanna take a look at http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/ On Mar 17, 8:30 am, Andreas <andreas.bex...@gmail.com> wrote: > I think it is interesting that your program freezes. What can you see > in your log? > > On Mar 17, 5:17 am, ARB <andrewrbro...@gmail.com> wrote: > > > > > Hello everyone, I am starting my first Android program, and I am just > > having trouble structuring my program appropriately (in terms of > > views, activities, etc...) > > > Basically, the program is a simple multiplayer trivia game where the > > phone is passed from player to player for each turn. Right now, I am > > storing game state in an object that is accessible in all other > > classes of the program. I have an activity that successfully > > retrieves a question, displays it for the current player, and > > correctly verifies input. Then, how do I change it so that it is the > > next player's turn? I tried starting a new instance of that same > > activity, since it could get the new game state from the separate > > object, but that just causes my program to freeze. Similarly, a while > > loop inside my activity causes the program to loop infinitely at that > > spot. > > > I'm sure I just don't quite understand how it all fits together, and > > I'd appreciate some help. So, to be clear, here are the important > > parts of my program that I have so far: > > > StartGame - activity that allows you to set up a new game launches > > PlayGame activity as an intent > > > PlayGame - activity that displays a question and verifies input as an > > answer. I can only launch it once and display one question. This > > activity is meant to be re-used to display all the questions, since it > > gets information on the game state (turns, current question, answer, > > etc...) from the Game class. > > > Game - object that is statically available to all other parts of the > > program. It is a singleton, so there will only ever be one instance > > of it. > > > How should I structure my program so that it can show multiple > > questions in succession until a certain condition is met (i.e. each > > player has had 4 turns, or there have been 10 total rounds, etc...)? > > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en