Code example for SimpleCursorAdapter

Methods: swapCursor

0
    return(new CursorLoader(this, Provider.Constants.CONTENT_URI,
                            PROJECTION, null, null, null));
  } 
 
  public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
    adapter.swapCursor(cursor);
  } 
 
  public void onLoaderReset(Loader<Cursor> loader) {
    adapter.swapCursor(null);
  } 
   
  private void add() { 
    LayoutInflater inflater=LayoutInflater.from(this);
    View addView=inflater.inflate(R.layout.add_edit, null);
    final DialogWrapper wrapper=new DialogWrapper(addView);
     
    new AlertDialog.Builder(this)
      .setTitle(R.string.add_title)
      .setView(addView)
      .setPositiveButton(R.string.ok,