title: listview adapter implementation
body: <p>With the application i am working on i came with the following problem. I have a listview that should display data from a data base table. There are two scenarios that could happen:</p>
  
  <ul>
  <li>Scenario 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.</li>
  <li>Scenario two - the table has been already filled and the listview has to just display the content</li>
  </ul>
  
  <p>So the problem is how to accomplish this behavior using ListView and ListAdapter.</p>
  
  <p>So far i have solution for each scenario but no for the two together.</p>
  
  <ul>
  <li>Scenario 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 when came scenario two i query all the table than copy all values to the ArrayAdapter in one step which is pretty slow.</li>
  <li>Scenario two - Query the db again the just use CursorAdapter. But in this case i can't update the ListView dynamically using CursorAdapter.</li>
  </ul>
  
  <p>So any ideas how to implement this using one adapter, or just should i use ArrayAdapter and CursorAdapter depending on the case ?</p>