You can also use full screen non-transparent dialogs. They look like
activities, but are simpler to handle. For example for "Settings"
screen of a game I would (and in fact, do) go with dialogs.


Dmitry

On 20 авг, 13:40, loctarar <[email protected]> wrote:
> Hello!
>
> This may sound a little silly. Let's say I want to build a game with a
> menu, an options screen, a form screen (for the user to insert some
> data) and the game screen. The usual approach would be to have an
> activity for each case (correct me if I'm wrong). What if I do another
> thing... and code four views for each case and swap them using
> setContentView() in the same activity? Suppose that I'll override the
> onSaveInstanceState() to save the state of the views in all the four
> cases.
>
> What is the disadvantage in this approach besides having a huge
> activity that I'm sure it gets closed every time the system is low in
> memory?
>
> I haven't tested it yet, but I didn't find anything in the docs that
> could stop this approach to work. The reasons for avoiding the "usual"
> implementation is that I need to convert an application from J2ME and
> having multiple activities raises some difficulties in the porting
> process.
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to