title: Sending bulk of data from one activity to another activity?
body: <p>Friends i have 2 text boxes...
  user have to fill all the text boxes and then press the submit button.
  On pressing submit button new activity should start and all the filled information should be displayed over there.
  I have tried it using intent but the second activity showing only content of one textbox.
  please tell me what to do?
  Thanks in advance</p>
  
  <pre><code>package com.example.myfirstapp;
  
  public class MainActivity extends Activity {
  
  static final String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  public void sendMessage(View view)
  {
      Intent intent = new Intent(this, DisplayMessageActivity.class); 
  
      EditText editText = (EditText) findViewById(R.id.edit_message);
      EditText editText1 = (EditText) findViewById(R.id.edit_message2);
      String message = editText.getText().toString();
      String message2 = editText1.getText().toString();
      intent.putExtra(EXTRA_MESSAGE, message);
      intent.putExtra(EXTRA_MESSAGE, message2);
      startActivity(intent);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>here is my second activity</p>
  
  <pre><code>package com.example.myfirstapp;
  
  public class DisplayMessageActivity extends Activity {
  
  enter code here
  
  @Override
  
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_display_message);
  
      // Get the message from the intent
  
      Intent intent = getIntent();
  
      String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
  
      // Create the text view
      TextView textView = new TextView(this);
      textView.setTextSize(40);
      textView.setText(message);
  
      // Set the text view as the activity layout
      setContentView(textView);
      // Show the Up button in the action bar.
  
     String message2 = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
      TextView textView1 = new TextView(this);
      textView1.setTextSize(40);
      textView1.setText(message2);
      setContentView(textView1);
      setupActionBar();
  }
  
  /**
   * Set up the {@link android.app.ActionBar}, if the API is available.
   */
  @TargetApi(Build.VERSION_CODES.HONEYCOMB)
  private void setupActionBar() {
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB) {
          getActionBar().setDisplayHomeAsUpEnabled(true);
      }
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.display_message, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      case android.R.id.home:
          // This ID represents the Home or Up button. In the case of this
          // activity, the Up button is shown. Use NavUtils to allow users
          // to navigate up one level in the application structure. For
          // more details, see the Navigation pattern on Android Design:
          //
          // http://developer.android.com/design/patterns/navigation.html#up-vs-back
          //
          NavUtils.navigateUpFromSameTask(this);
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>i am getting text of second text field (message 2) only...</p>
  
  <p>what to do???</p>