title: The content doesn't appears when I return to the previous activity
body: <p>I have an Android app, which about writing notes. When I press the Edit button in <strong>Second2</strong> Activity it will move to the <strong>Second3</strong> Activity without any problems (In <strong>Second3</strong> Activity I can edit the note without any problem). But when I press the Save button, it will return to <strong>Second2</strong> but nothing appears there! It's just an empty Activity! Help me, please!</p>
  
  <p><strong>MainActivity class:</strong></p>
  
  <pre><code>package com.twitter.i_droidi.mynotes;
  
  import android.app.AlertDialog;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.ContextMenu;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.Toast;
  import java.util.List;
  import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdView;
  
  public class MainActivity extends ActionBarActivity implements AdapterView.OnItemClickListener {
  
      ListView lv;
      NotesDataSource nDS;
      List&lt;NotesModel&gt; notesList;
      String[] notes;
      int i;
      ArrayAdapter&lt;String&gt; adapter;
      AdView mAdView;
      AdRequest adRequest;
      public static long back_pressed;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          nDS = new NotesDataSource(this);
          lv = (ListView) findViewById(R.id.lv);
  
          nDS.open();
          notesList = nDS.getAllNotes();
          nDS.close();
  
          notes = new String[notesList.size()];
  
          for (i = 0; i &lt; notesList.size(); i++) {
              notes[i] = notesList.get(i).getTitle();
          }
  
          adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_list_item_1,
                  android.R.id.text1, notes);
          lv.setAdapter(adapter);
  
          registerForContextMenu(lv);
          lv.setOnItemClickListener(this);
  
          mAdView = (AdView) findViewById(R.id.adView);
          adRequest = new AdRequest.Builder().build();
          mAdView.loadAd(adRequest);
      }
  
      @Override
      public void onBackPressed()
      {
          if (back_pressed + 2000 &gt; System.currentTimeMillis()) super.onBackPressed();
          else Toast.makeText(this, "Press once again to exit!", Toast.LENGTH_SHORT).show();
          back_pressed = System.currentTimeMillis();
      }
  
      @Override
      public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
          Intent nView = new Intent(this, Second2.class);
          nView.putExtra("id", notesList.get(position).getId());
          nView.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          startActivity(nView);
      }
  
      @Override
      public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_delete, menu);
          super.onCreateContextMenu(menu, v, menuInfo);
      }
  
      @Override
      public boolean onContextItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case R.id.delete:
                  AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
                  nDS.open();
                  nDS.deleteNote(notesList.get(info.position).getId());
                  notesList = nDS.getAllNotes();
                  nDS.close();
  
                  notes = new String[notesList.size()];
  
                  for (i = 0; i &lt; notesList.size(); i++) {
                      notes[i] = notesList.get(i).getTitle();
                  }
  
                  adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_list_item_1,
                          android.R.id.text1, notes);
                  lv.setAdapter(adapter);
  
                  registerForContextMenu(lv);
                  lv.setOnItemClickListener(this);
  
                  Toast nDelete = Toast.makeText(this, R.string.deleted, Toast.LENGTH_LONG);
                  nDelete.show();
          }
          return super.onContextItemSelected(item);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case R.id.mainMenuNewNote:
                  Intent nNote = new Intent(this, Second.class);
                  startActivity(nNote);
                  return true;
  
              case R.id.mainMenuAbout:
                  AlertDialog.Builder aboutDialog = new AlertDialog.Builder(this);
                  aboutDialog.setTitle(getString(R.string.about_title));
                  aboutDialog.setMessage(R.string.about_body);
                  aboutDialog.setIcon(R.drawable.my_notes);
                  aboutDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface aboutDialog, int witch) {
                          // Do Not Do Anything.
                      }
                  });
  
                  aboutDialog.show();
                  return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>Second class:</strong></p>
  
  <pre><code>package com.twitter.i_droidi.mynotes;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.ActionBarActivity;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.widget.EditText;
  import android.widget.Toast;
  
  public class Second extends ActionBarActivity {
  
      NotesDataSource nDS;
      EditText noteTitle;
      EditText noteBody;
      int id;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.second);
  
          Intent in = getIntent();
          id = in.getIntExtra("id", 0);
  
          noteTitle = (EditText) findViewById(R.id.note_title);
          noteBody = (EditText) findViewById(R.id.note);
          nDS = new NotesDataSource(this);
  
          nDS.open();
          NotesModel note = nDS.getNote(id);
          nDS.close();
  
          noteTitle.setText(note.getTitle());
          noteBody.setText(note.getBody());
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_second, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case R.id.secondMenuSave:
                  if (!noteTitle.getText().toString().isEmpty() &amp;&amp; !noteBody.getText().toString().isEmpty()) {
                      nDS.open();
                      nDS.createNote(noteTitle.getText().toString(), noteBody.getText().toString());
                      nDS.close();
                      Toast nSave = Toast.makeText(this, R.string.saved, Toast.LENGTH_LONG);
                      nSave.show();
                      Intent nView = new Intent(this, MainActivity.class);
                      nView.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                      startActivity(nView);
                  } else {
                      Toast notSave = Toast.makeText(this, R.string.do_not_save, Toast.LENGTH_LONG);
                      notSave.show();
                  }
                  return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>Second2 class:</strong></p>
  
  <pre><code>package com.twitter.i_droidi.mynotes;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.ActionBarActivity;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.widget.TextView;
  
  public class Second2 extends ActionBarActivity {
  
      TextView viewNoteTitle;
      TextView viewNoteBody;
      int id;
      NotesDataSource nDS;
      NotesModel note;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.second2);
  
          Intent in = getIntent();
          id = in.getIntExtra("id", 0);
  
          viewNoteTitle = (TextView) findViewById(R.id.view_note_title);
          viewNoteBody = (TextView) findViewById(R.id.view_note);
          nDS = new NotesDataSource(this);
  
          nDS.open();
          note = nDS.getNote(id);
          nDS.close();
  
          viewNoteTitle.setText(note.getTitle());
          viewNoteBody.setText(note.getBody());
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_second2, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case R.id.second2MenuEdit:
                  Intent nEdit = new Intent(this, Second3.class);
                  nEdit.putExtra("id", note.getId());
                  nEdit.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                  startActivity(nEdit);
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>Second3 class:</strong></p>
  
  <pre><code>package com.twitter.i_droidi.mynotes;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.ActionBarActivity;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.widget.EditText;
  import android.widget.Toast;
  
  public class Second3 extends ActionBarActivity {
  
      NotesDataSource nDS;
      EditText noteTitle;
      EditText noteBody;
      int id;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.second);
  
          Intent in = getIntent();
          id = in.getIntExtra("id", 0);
  
          noteTitle = (EditText) findViewById(R.id.note_title);
          noteBody = (EditText) findViewById(R.id.note);
          nDS = new NotesDataSource(this);
  
          nDS.open();
          NotesModel note = nDS.getNote(id);
          nDS.close();
  
          noteTitle.setText(note.getTitle());
          noteBody.setText(note.getBody());
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_second, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case R.id.secondMenuSave:
                  if (!noteTitle.getText().toString().isEmpty() &amp;&amp; !noteBody.getText().toString().isEmpty()) {
                      nDS.open();
                      nDS.updateNote(id, noteTitle.getText().toString(), noteBody.getText().toString());
                      nDS.close();
                      Toast nSave = Toast.makeText(this, R.string.saved, Toast.LENGTH_LONG);
                      nSave.show();
                      Intent nView = new Intent(this, Second2.class);
                      nView.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                      startActivity(nView);
                  } else {
                      Toast notSave = Toast.makeText(this, R.string.do_not_save, Toast.LENGTH_LONG);
                      notSave.show();
                  }
                  return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>