There is not a single performance issue that I am trying to solve.  It
is more of an issue of keeping the code simple, limiting the number of
Activities in my application and reducing the number of places that I
have to access my content providers.  Often times I have something
like a Sports game view that provides multiple way of visualizing the
same data.  I would like to have a single Activity that exposes that
Game and allow the activity to choose what to display based on how the
user interacts with that activity.  In the APIDemos project I saw how
simple it was to set a particular view/layout to be hidden and thought
that would be a great way of switching being visual metaphors within
the Activity.  Plus, I assume there is much more overhead in loading
an Activity that simple setting a view to be hidden.

Mark

On Dec 16, 11:14 am, Romain Guy <romain...@google.com> wrote:
> Such an approach would be very inefficient for several reasons. First
> of all it requires to inflate many resources that won't be needed
> right away, which will slow down your application startup time. It
> will also increase memory usage. Then you will defeat the history
> mechanism built in Android, thus forcing you to implement the back
> yourself, and everything it entails. It's a lot more work for you, and
> you will probably end up having a user experience that feels like
> other Android apps but not quite.
>
> What performance issue are you trying to solve?
>
>
>
> On Tue, Dec 16, 2008 at 6:01 PM, Mark <mark.nuetzm...@gmail.com> wrote:
>
> > Would there be an advantage of using multiple Activity classes each
> > with their own primary layout as opposed to creating multiple layout
> > views and stacking them into FrameLayout?  One of the things I
> > currently do in my WM development that has worked very well in terms
> > of performance is to create multiple layers for a form and then show
> > or hide the layers based on what the user is doing.  I could see using
> > the FrameLayout class to stack multiple other layouts that would
> > provide the same capabilities.  This would allow me to use a single
> > Activity to wrap what I need rather than creating multiple Activities.
>
> > thanks,
> > Mark
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to