Hi all, With the application i am working on i came with the following problem. I have a listview that should display data from a database table. But in background the data table could have two states:
State one - the database table is filling dynamically and the listview also should dynamically display table's information e.g to grow depending on table size. State two - the table has been already filled and the listview has to just display the content So the problem is how to implement such ListAdapter for my ListView . So far i have solution for each scenario but no for the two together. State one - Use AsyncTask and ArrayAdapter. In doInBackGround query the db periodically and pass the result to onProgressUpdate, than just fill the ArrayAdapter with the newly added values. But if it happens to be state two i query all the table than copy all values to the ArrayAdapter in one step which is pretty slow. State two - Query the db the just use CursorAdapter. But in this case i can't update the ListView dynamically using CursorAdapter, so state one fails. So any ideas how to implement this using one adapter, or just should i use ArrayAdapter and CursorAdapter depending on the case ? -- 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