title: Using a ListAdapter to show database data
body: <pre><code>public class List_View extends ListActivity {
  
      private TextView toptext; 
      private TextView bottomtext;
  
      DBAdapter db = new DBAdapter(this);
  
      public void onCreate(Bundle icicle)
      {
          super.onCreate(icicle);
          setContentView(R.layout.list);
          getData();
  
          toptext = (TextView) findViewById(R.id.toptext); 
          bottomtext = (TextView) findViewById(R.id.bottomtext); 
  
      }
  
      private void getData() {            
             db.open();
  
             Cursor c = db.getAllEntry();
             c.moveToFirst(); 
  
             ListAdapter adapter = new SimpleCursorAdapter(this,R.layout.view_list, c, new String[] {"date", "title"}, new int[] {R.id.toptext, R.id.bottomtext});
  
             bottomtext.setText(c.getString(1)); 
             toptext.setText(c.getString(4)); 
  
             setListAdapter(adapter);
  
             db.close(); 
      }
  
  }
  </code></pre>
  
  <p>I would like to show stored data from database into a ListView.  </p>
  
  <p>Title and Date only.  </p>