views:

30

answers:

1

I have an Android application that works off of a smaller database, around 300 entries. To view the database, I have created a custom view that contains individual rows of data. Then I query the database, and add each line to a newly created custom view.

The problem is that it takes a little white for all of this to be created/loaded, so when you open the application, it sits for a few seconds.

How can I load one line of data, then display it, then the next, append it, etc.?

A: 

Two ideas come to mind...

  1. Use a progress_bar while you're loading the data

  2. Load the data in a separate thread, then invalidate the View, and allow the loading thread to sleep (for a bit) to allow the main thread to re-draw the view.

tobrien