Can someone give me an example of what the onResume() should look like.  I 
did this and my app crashes

  @Override
  public void onResume()
   { lv_adapter.notifyDataSetChanged();   }


this is in the onCreate above

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_selected);
    onRestart();
    onStart();
    onResume();
    onPause();

      lv_err_msg = "Error creating DB Adapter";
      DBAdapter db = new DBAdapter(this);
         
      lv_err_msg = "Error retrieving DB Cursor";
      db.open();
      lv_cursor = db.getAllLocations(); 
      
      lv_err_msg = "Error starting Cursor Manager";
      startManagingCursor(lv_cursor);

      String[] from = new String[] { "loc_display" ,"_id" };
      int[] to = new int[] { R.id.display  }; //,R.id.loc_id

      lv_err_msg = "Error creating Simple Cursor Adapter";
      final SimpleCursorAdapter LocationList = new SimpleCursorAdapter
                                                      ( this
                                                       
,R.layout.main_selected_row
                                                       ,lv_cursor
                                                       ,from
                                                       ,to);
      
      lv_err_msg = "Error setting List Adapter";
      setListAdapter(LocationList);
      db.close();
      
      lv_err_msg = "Error setting up ArrayAdapter data set changed";
      lv_adapter = ((SimpleCursorAdapter)getListAdapter()); 

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