I am also a beginner and from what I understand:

Activity objects are used to pass Intent objects to and from other
Activity objects. Each Activity would have it's own View object
associated with it.
A layout is simply a list of UI element parameters for each Activity.
A Layout, as in android.text.Layout, is a class for setting text in
the UI elements.
http://developer.android.com/reference/android/text/Layout.html

I guess if you had multiple layout screens for a single Activity, you
would still need to create the window and according to the
documentation:
"Almost all activities interact with the user, so the Activity class
takes care of creating a window for you in which you can place your UI
with setContentView(View)."
http://developer.android.com/reference/android/app/Activity.html

I have not looked to see the other ways in which you could create a
window without using setContentView(View), unless you subclassed
android.app.Activity.

I hope this helps.


On Nov 23, 5:25 am, Huckey <zenon.hak...@gmail.com> wrote:
> Hi all,
>   I am new to Android.
>
>   One of the questions to which I still haven't been able to get a
> good answer has with Activities and Layouts to do.
>
>   I think I understand the basic concepts of Activity and Layout. I
> have however a problem determining whether I should use a new Activity
> or a new Layout in certain cases.
>
>   I mean in my application I can have only one Activity but many
> layouts and switch between the layouts within this Activity.
> Alternatively I can have many Activities, each with its separate
> Layout, and switch between Activities.
>
>   Apart from making the code look nicer and being better organized
> with Activities are there any other arguments (e.g. performance) which
> should make me create new Activities instead of new Layouts in one
> Activity?
>
>   Thanks!
>
> Best regards
>
> Huckey

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to