title: How to display inputted text in a TextView after clicking a button in Android studio?
body: <p>So I am experimenting with Android Studio. I am stuck in the part where I want my "Submit" button to display the user inputted text underneath the page. </p>
  
  <p>Button submit is the button.
  "name" and "email" are the EditText variables a.k.a text fields
  My TextView variable is outputText</p>
  
  <p>So after the user enters random stuff in both text fields and click submit, I want my outputText to display both texts that were inputted in 2 separate lines</p>
  
  <p>ex:</p>
  
  <p>John Smith</p>
  
  <p>john.smith@gmail.com</p>
  
  <p>The code below is my .java code for the activity. I need to know how to initialize the new intent in a way that lets me do the 4 lines below it. Thanks.</p>
  
  <pre><code>public void buttonOnClick(View v){
      Button submit = (Button) v;
  
      submit.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              Intent i =
                      new Intent(...?...);
              startActivity(i);
          }
      });
      editName = (EditText) findViewById(R.id.name);
      editEmail = (EditText) findViewById(R.id.email);
  
      textout = (TextView) findViewById(R.id.textView);
      textout.setText(editName.getText()+" "+editEmail.getText());
  
  
  }    
  </code></pre>