Code example for SimpleCursorAdapter

Methods: changeCursor

0
 
    return(loader);
  } 
 
  public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
    adapter.changeCursor(cursor);
  } 
 
  public void onLoaderReset(Loader<Cursor> loader) {
    adapter.changeCursor(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,
                                                    new DialogInterface.OnClickListener() {