Defero wrote:Ive seen examples where they create a new Intent and then start the activity from a class which divides the code quite nicely.
This is known as the dashboard UI pattern. The Facebook, Yelp, and many apps use this pattern. Sure it can be used for a game, but consider that separating your app this way and hard locking things to the Activity lifecycle could make it harder to port it to other platforms. But don't let cross-platform concerns stop you now since it sounds like your just getting started and you'll be working with Android for a bit.
Defero wrote:So you can start the "options" screen activity or "about" or "start"...
I have i problem that i want for all this screens to be animated, menu too, where i use a thread.
The question is, is there a nice way to divide this now or do i have to use a switch statement in the thread and switch there what is drawn?
Indeed. I'd recommend creating some sort of rendering interface and have one or a list of renderers that has an update method that receives the current time and such. You'll want to avoid conditional statements if/switch in a render loop if possible otherwise things will be very static. You can schedule changes to the order of the renderers in the loop too as potentially one time runnables that execute at the beginning of the loop thus removing the necessity of conditional statements in the loop itself. Conceivably this is how you can switch game states whether that is a menu or something else.
I'm soon releasing a real time app / game dev platform for Android called TyphonRT. What I do is have a clocking thread that is at the Application level and is shared between Activities such that when a new Activity starts it may immediately attach to the clocking thread for animation / updates. This is useful for whatever graphics API used (Android 2D or OpenGL ES). Drop me a note at the contact email and I'll keep you posted.