I have an application that loads a list of items with thumbnails from
a server, and shows those items in a ListView.

The laoding of the data is done before the ListViewActivity is started
and while that is being done, a ProgressDialog is shown. When the
loading of the data is done, I start an activity with a ListView that
displays the items. The thumbnails are downloaded in a seperate thread
when they are needed in the getView method of ListView.

This is my problem: When the loading of the data is done, I call
startActivity with an Intent to start the ListActivity and in that
intent I put the data.
My problem is that this takes a few seconds sometimes. How can I speed
this up?

Below is the sequence + where it goes wrong:

The items are downloaded with an AsyncTask that shows a
ProgressDialog.
The progressDialog is dissmissed, and startactivity is called.

Intent in = new Intent(CategoryListScreen.this,
VideoListScreen.class);
in.putParcelableArrayListExtra("items", items);
startActivity(in);

The listAdapter is created in the onCreate method of my
VideoListScreen
getView is called a few times...
The VideoListScreen is displayed (a few seconds after the
progressDialog has been dissmissed)

Also the Logcat output from the ActivityManager indicates it takes a
few seconds for my activity to start:
E.g:
10:13:22.254 - ActivityManager - Starting activity: VideoListScreen
10:13:25.424 - ActivityManager - Displayed activity: VideoListScreen:
3166 ms

How can I make that the activity is displayed faster?

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