I have a list activity with a custom list adapter that is constructed
around People.Contacts (just the NAME column).  I customize it by
adding an ImageView to each row, to go with the TextView that displays
the name of the contact.

As far as I can tell, this is all I do.  I also have menu options that
allow you to launch things like the view contact activity (something
like:

Uri uri1 = Uri.withAppendedPath(People.CONTENT_URI, ""+personID1);
Intent i1 = new Intent(Intent.ACTION_VIEW, uri1);
startActivity(i1);

Apparently, if I repeat this operation multiple times from my list
activity, then hit the BACK button to return to my list activity, the
load time for my list activity gets worse and worse, and eventually
triggers an ANR.  However, quitting my list activity and restarting it
(essentially going through onPause(), onStop(), then onDestroy(), and
then onStart(), onCreate(), and onResume()), will reload the list
quickly with no problems.

I believe the problem lies somewhere in the onPause(), onStop(), and
onRestart(), onStart(), onResume() sequence that happens when I launch
a new activity then return to my list activity.

Any help on why the performance would get worse and worse each time
would be appreciated.  The fact that the list can be loaded "from
scratch" in onCreate() tells me it doesn't have anything to do with
the list adapter (I've also tried destroying all references to objects/
variables in onPause(), then copy/pasting the initialization code I
use in onCreate() into onResume(), but this did not solve anything).

P.S. One last note, is that I am able to launch new an activity that
has Theme.Dialog, and basically go through the onPause()-onResume()
cycle many many times, with no performance issues.  Basically, it
seems like something about onStop() and/or onRestart() is going
haywire.

--~--~---------~--~----~------------~-------~--~----~
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