On Oct 24, 1:06 pm, "Robert K." <[EMAIL PROTECTED]> wrote:
> I agree, but as I have understood, freeing up memory would mean that
> the particular acivity is entirely shut down. The system would do that
> only if it is absolutely necessary. I doubt if the rest of the
> application continues working fine in that case.

If the appropriate state is saved during onPause(), why wouldn't the
rest of the application work when an activity is shut down.

And speaking of state, I don't think you want to be using
setContentView() to change views, even within a single application.
Changing content views for your application will mean the built-in
state management will fail.  Consider if the users receives a phone
call, switches task via notification, or hits the home button.  If
your activity is closed due to memory constraints, its last saved
state may not match the view when your application restarts.  Your
application will appear broken to a user, loosing state if they
multitask.

If you still insist on using a single activity, either add all UIs to
a single switchable view, or be prepared to write your own state
management code.


> What I
> really don't like about it for example is that everytime I want to add
> a new activity, I have to change the Manifest.xml in addition. Then, a
> 'Resource is out of sync' message appears, sometimes till I restart
> the computer...that's really annoying...


This should not be happening.  What development environment are you
using?

If you're using Eclipse, the resource update should almost been
instantaneous.  If you're using Ant, I can't imagine why the "out of
sync" message would appear, as the build start a new ant process that
should check everything from scratch.

I suggest starting a new thread, detailing the "Resource is out of
sync" problem to try to get to the bottom of it.


Anm
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to